Comments (5)
Is main
broken now? I am surprised the parameteric tests don't run. Though for CI, I must defer to @stinodego.
from polars.
I edited the text, it may be the issue is that my computer is faster so it runs more examples through Hypothesis. But there are failing tests on main
for me. E.g.:
$ pytest tests/unit/interchange/test_roundtrip.py -m hypothesis
==================================================================================== test session starts =====================================================================================platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.3.0
rootdir: /home/itamarst/devel/polars/py-polars
configfile: pyproject.toml
plugins: cov-4.1.0, anyio-4.2.0, hypothesis-6.88.1, xdist-3.3.1
collected 14 items / 4 deselected / 10 selected
tests/unit/interchange/test_roundtrip.py ......FF.. [100%]
========================================================================================== FAILURES ==========================================================================================___________________________________________________________________________ test_from_dataframe_pandas_parametric ____________________________________________________________________________tests/unit/interchange/test_roundtrip.py:135: in test_from_dataframe_pandas_parametric
dataframes(
tests/unit/interchange/test_roundtrip.py:150: in test_from_dataframe_pandas_parametric
result = pl.from_dataframe(df_pd)
polars/convert.py:771: in from_dataframe
return from_dataframe(df, allow_copy=allow_copy)
polars/interchange/from_dataframe.py:46: in from_dataframe
return _from_dataframe(
polars/interchange/from_dataframe.py:55: in _from_dataframe
polars_chunk = _protocol_df_chunk_to_polars(chunk, allow_copy=allow_copy)
polars/interchange/from_dataframe.py:71: in _protocol_df_chunk_to_polars
dtype = dtype_to_polars_dtype(column.dtype)
properties.pyx:36: in pandas._libs.properties.CachedProperty.__get__
???
../.venv/lib/python3.10/site-packages/pandas/core/interchange/column.py:128: in dtype
return self._dtype_from_pandasdtype(dtype)
../.venv/lib/python3.10/site-packages/pandas/core/interchange/column.py:141: in _dtype_from_pandasdtype
raise ValueError(f"Data type {dtype} not supported by interchange protocol")
E ValueError: Data type large_string[pyarrow] not supported by interchange protocol
E Falsifying example: test_from_dataframe_pandas_parametric(
E df=shape: (0, 1)
E ┌──────┐
E │ col0 │
E │ --- │
E │ str │
E ╞══════╡
E └──────┘,
E )
E Explanation:
E These lines were always and only run by failing examples:
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/dtypes/dtypes.py:2152
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/interchange/column.py:141
______________________________________________________________________ test_from_dataframe_pandas_zero_copy_parametric _______________________________________________________________________polars/testing/asserts/frame.py:114: in assert_frame_equal
_assert_series_values_equal(
polars/testing/asserts/series.py:180: in _assert_series_values_equal
raise_assertion_error(
E AssertionError: Series are different (exact value mismatch)
E [left]: [datetime.datetime(1974, 2, 4, 21, 23, 8, 840384)]
E [right]: [datetime.datetime(2000, 1, 1, 0, 0)]
The above exception was the direct cause of the following exception:
tests/unit/interchange/test_roundtrip.py:155: in test_from_dataframe_pandas_zero_copy_parametric
dataframes(
tests/unit/interchange/test_roundtrip.py:177: in test_from_dataframe_pandas_zero_copy_parametric
assert_frame_equal(result, df)
polars/testing/asserts/frame.py:123: in assert_frame_equal
raise_assertion_error(
E AssertionError: DataFrames are different (value mismatch for column 'col0')
E [left]: [datetime.datetime(1974, 2, 4, 21, 23, 8, 840384)]
E [right]: [datetime.datetime(2000, 1, 1, 0, 0)]
E Falsifying example: test_from_dataframe_pandas_zero_copy_parametric(
E df=shape: (1, 1)
E ┌─────────────────────┐
E │ col0 │
E │ --- │
E │ datetime[μs] │
E ╞═════════════════════╡
E │ 2000-01-01 00:00:00 │
E └─────────────────────┘,
E )
E Explanation:
E These lines were always and only run by failing examples:
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/arrays/arrow/array.py:1224
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/arrays/arrow/array.py:1238
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/arrays/arrow/array.py:1272
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/arrays/datetimelike.py:354
E /home/itamarst/devel/polars/.venv/lib/python3.10/site-packages/pandas/core/construction.py:616
E (and 54 more with settings.verbosity >= verbose)
================================================================================== short test summary info ===================================================================================FAILED tests/unit/interchange/test_roundtrip.py::test_from_dataframe_pandas_parametric - ValueError: Data type large_string[pyarrow] not supported by interchange protocol
FAILED tests/unit/interchange/test_roundtrip.py::test_from_dataframe_pandas_zero_copy_parametric - AssertionError: DataFrames are different (value mismatch for column 'col0')
========================================================================= 2 failed, 8 passed, 4 deselected in 21.59s =========================================================================
from polars.
I think you just need to update your pandas version
from polars.
Earlier today I was on 2.1.4. I just upgraded to 2.2.0, and now I'm getting just failing tests to DeprecationWarning on test_roundtrip.py
, rather than what I was getting before. So, maybe. Any sense why DeprecationWarnings would be errors locally but not in CI?
from polars.
Anyway can't reproduce with Pandas 2.2.0 so closing, sorry for the noise.
from polars.
Related Issues (20)
- Add `show` method to `DataFrame` and `LazyFrame` HOT 3
- `gather` in `agg` context gathers values from other groups
- ShapeError: filter's length: 155 differs from that of the series: 0 HOT 9
- Version 0.20.30 bug HOT 4
- `.list.to_array()` fails if first element of a list column is excluded HOT 2
- `scan_parquet` + `with_row_index` causing `pl.len()` to return 0 HOT 1
- full join with coalesce=True panics if more key expressions are used than columns in a frame
- LazyFrames containing nested List types will cause panic in `collect()` HOT 1
- Another "coalesce=False" `join` schema issue HOT 2
- performance slowdown with `Expr.alias` HOT 3
- Shift(n) should accept a varying n HOT 4
- Rolling ewm/prod/rank HOT 4
- Improve string split API and DataTypes (`split`, `splitn`, `split_exact`) HOT 2
- Inconsistent Behavior with `inspect` in Aggregations
- In LazyFrame, select empty Series causes panic HOT 3
- `check_sorted` causes error in `DataFrame.rolling` HOT 3
- Expose API for custom grouping operations similar to expression plugin API
- add strategy="mode" for fill_null HOT 5
- `write_parquet(pyarrow=False)` with `Struct` panic: "The children must have an equal number of values." HOT 2
- Add `pl.Config.show_full` (or something similar) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polars.