-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CoW: Return read-only array in Index.values #53704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
3cc9846
6d050d8
4c2dac9
2e45177
6e19b8d
47d38a2
2f1623a
7fe0283
02632a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -433,8 +433,12 @@ def test_read_columns(self, engine): | |
df, engine, expected=expected, read_kwargs={"columns": ["string"]} | ||
) | ||
|
||
def test_write_index(self, engine): | ||
def test_write_index(self, engine, using_copy_on_write, request): | ||
check_names = engine != "fastparquet" | ||
if using_copy_on_write and engine == "fastparquet": | ||
request.node.add_marker( | ||
pytest.mark.xfail(reason="fastparquet write into index") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does fastparquet exactly? (it tries to write into the array it gets from the index? Do you know why? (that sounds as a bug in fastparquet, as it can change the dataframe you are writing?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can simply set the flag there, they seem to use the index to do a conversion. It's already on my todo list, but don't want to block this pr because of that |
||
) | ||
|
||
df = pd.DataFrame({"A": [1, 2, 3]}) | ||
check_round_trip(df, engine) | ||
|
@@ -1213,12 +1217,14 @@ def test_error_on_using_partition_cols_and_partition_on( | |
partition_cols=partition_cols, | ||
) | ||
|
||
@pytest.mark.skipif(using_copy_on_write(), reason="fastparquet writes into Index") | ||
def test_empty_dataframe(self, fp): | ||
# GH #27339 | ||
df = pd.DataFrame() | ||
expected = df.copy() | ||
check_round_trip(df, fp, expected=expected) | ||
|
||
@pytest.mark.skipif(using_copy_on_write(), reason="fastparquet writes into Index") | ||
def test_timezone_aware_index(self, fp, timezone_aware_date_list): | ||
idx = 5 * [timezone_aware_date_list] | ||
|
||
|
@@ -1328,6 +1334,7 @@ def test_invalid_dtype_backend(self, engine): | |
with pytest.raises(ValueError, match=msg): | ||
read_parquet(path, dtype_backend="numpy") | ||
|
||
@pytest.mark.skipif(using_copy_on_write(), reason="fastparquet writes into Index") | ||
def test_empty_columns(self, fp): | ||
# GH 52034 | ||
df = pd.DataFrame(index=pd.Index(["a", "b", "c"], name="custom name")) | ||
|
Uh oh!
There was an error while loading. Please reload this page.