chore: Support Python 3.10 and bump pandas 1.4 and pyarrow 6 (#21002)

* Bump pandas 1.4 and pyarrow 6

* Use engine="pyarrow" for pd.read_csv()

* Refactoring

* Refactoring

* Refactoring

* Use bytes in pd.read_json()

* Fix test_contribution

* Fix pandas issue when 'arrays' are empty but 'names' contain values

* fix: ValueError: For argument "ascending" expected type bool, received type NoneType.

* Remove engine="pyarrow" and convert bytes to string

* make copy of selected df to fix regression

* Simplify pd.read_json() and pd.read_csv() for example data

Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
This commit is contained in:
EugeneTorap
2022-08-17 16:36:36 +03:00
committed by GitHub
parent 94e8fd3b35
commit 76d6a9af91
20 changed files with 55 additions and 60 deletions

View File

@@ -49,6 +49,9 @@ def contribution(
"""
contribution_df = df.copy()
numeric_df = contribution_df.select_dtypes(include=["number", Decimal])
# TODO: copy needed due to following regression in 1.4, remove if not needed:
# https://github.com/pandas-dev/pandas/issues/48090
numeric_df = numeric_df.copy()
numeric_df.fillna(0, inplace=True)
# verify column selections
if columns: