Skip to content

Add pandas 2.0 support#2585

Merged
thehomebrewnerd merged 6 commits into
mainfrom
issue-2532-support-pandas-2.0
Jul 18, 2023
Merged

Add pandas 2.0 support#2585
thehomebrewnerd merged 6 commits into
mainfrom
issue-2532-support-pandas-2.0

Conversation

@thehomebrewnerd

@thehomebrewnerd thehomebrewnerd commented Jul 17, 2023

Copy link
Copy Markdown
Contributor

Add pandas 2.0 support

Closes #2532
Closes #2556

@codecov

codecov Bot commented Jul 17, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2585 (dccd005) into main (2687140) will increase coverage by 11.73%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main    #2585       +/-   ##
===========================================
+ Coverage   87.74%   99.47%   +11.73%     
===========================================
  Files         393      403       +10     
  Lines       23271    24198      +927     
===========================================
+ Hits        20419    24071     +3652     
+ Misses       2852      127     -2725     
Impacted Files Coverage Δ
...ndard/transform/binary/multiply_numeric_boolean.py 100.00% <ø> (ø)
...ive_tests/transform_primitive_tests/test_season.py 100.00% <ø> (ø)
featuretools/demo/flight.py 96.10% <100.00%> (+75.32%) ⬆️
featuretools/synthesis/encode_features.py 98.79% <100.00%> (+14.64%) ⬆️
.../tests/computational_backend/test_dask_features.py 100.00% <100.00%> (ø)
featuretools/tests/entityset_tests/test_es.py 100.00% <100.00%> (ø)
...ools/tests/entityset_tests/test_last_time_index.py 100.00% <100.00%> (ø)
...aggregation_primitive_tests/test_agg_primitives.py 100.00% <100.00%> (ø)
...ggregation_primitive_tests/test_num_consecutive.py 100.00% <100.00%> (ø)
...s/tests/primitive_tests/test_transform_features.py 99.87% <100.00%> (ø)
... and 2 more

... and 52 files with indirect coverage changes

@thehomebrewnerd thehomebrewnerd marked this pull request as draft July 17, 2023 16:28
@thehomebrewnerd thehomebrewnerd marked this pull request as ready for review July 17, 2023 19:32
primitive_func = self.primitive().get_function()
given_answer = primitive_func(data)
assert np.isclose(answer, given_answer, atol=0.01)
if dtype == "float64":

@sbadithe sbadithe Jul 17, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a blocker (more of an incidental comment), but seeing the if clause here makes me consider if we should eventually refactor this test. Given that the previous data objects are being cast to float64 dtype as well, and the test previously did not require if clauses, it seems like there are three separate classes of behaviors here:

  • How the kurtosis method handles the int64 dtype
  • How the kurtosis primitive handles the float64 dtype when the data "looks like" an int64 (evidently this doesn't seem to differ from the previous class)
  • How the kurtosis primitive handles the float64 dtype when the data are "true" floats

Separating those at some point might help to better document this primitive's behavior.

@thehomebrewnerd thehomebrewnerd merged commit d39b7d8 into main Jul 18, 2023
@thehomebrewnerd thehomebrewnerd deleted the issue-2532-support-pandas-2.0 branch July 18, 2023 13:10
@thehomebrewnerd thehomebrewnerd mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dask 2023.4.0 in Featuretools Support pandas 2.0.0 in Featuretools

3 participants