-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team
Description
Please answer these questions before submitting your issue. Thanks!
-
What version of Python are you using?
python 3.10 -
What operating system and processor architecture are you using?
Windows-10-10.0.26200-SP0
-
What are the component versions in the environment (
pip freeze)?
snowflake-snowpark-python -1.47.0
- What did you do?
data = [
Row(id=1, dept="IT", salary=5000),
Row(id=2, dept="IT", salary=7000),
Row(id=3, dept="HR", salary=4000),
Row(id=4, dept="HR", salary=4500),
]
df = session.create_dataframe(data)
approx_q_column_object = df.approxQuantile(
col("salary"),
[0.5, 0.9]
)
TypeError: Cannot convert a Column object into bool: please use '&' for 'and', '|' for 'or', '~' for 'not' if you're building DataFrame filter expressions. For example, use df.filter((col1 > 1) & (col2 > 2)) instead of df.filter(col1 > 1 and col2 > 2).
5. What did you expect to see?
Instead of error , I am expecting Dataframe with the results.
-
Can you set logging to DEBUG and collect the logs?
import logging for logger_name in ('snowflake.snowpark', 'snowflake.connector'): logger = logging.getLogger(logger_name) logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s')) logger.addHandler(ch)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team