-
Notifications
You must be signed in to change notification settings - Fork 52
fix: fix value_counts column label for normalize=True #245
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 all commits
f4a0607
74f63bc
5561feb
60f69d7
9404a67
7ac3109
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 |
---|---|---|
|
@@ -3453,6 +3453,8 @@ def test_df_to_orc(scalars_df_index, scalars_pandas_df_index): | |
], | ||
) | ||
def test_df_value_counts(scalars_dfs, subset, normalize, ascending, dropna): | ||
if pd.__version__.startswith("1."): | ||
pytest.skip("pandas 1.x produces different column labels.") | ||
scalars_df, scalars_pandas_df = scalars_dfs | ||
|
||
bf_result = ( | ||
|
@@ -3464,10 +3466,6 @@ def test_df_value_counts(scalars_dfs, subset, normalize, ascending, dropna): | |
subset, normalize=normalize, ascending=ascending, dropna=dropna | ||
) | ||
|
||
# Older pandas version may not have these values, bigframes tries to emulate 2.0+ | ||
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. Let's remove this from test_series as well https://github.com/search?q=repo%3Agoogleapis%2Fpython-bigquery-dataframes%20%22Older%20pandas%20version%20may%20not%20have%20these%20values%22&type=code 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. done 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. Thanks, just one one more test 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. done |
||
pd_result.name = "count" | ||
pd_result.index.names = bf_result.index.names | ||
|
||
pd.testing.assert_series_equal( | ||
bf_result, pd_result, check_dtype=False, check_index_type=False | ||
) | ||
|
Uh oh!
There was an error while loading. Please reload this page.