Skip to content

Fix axis=None warning#8555

Merged
jsignell merged 2 commits intodask:mainfrom
jsignell:axis-none
Jan 18, 2022
Merged

Fix axis=None warning#8555
jsignell merged 2 commits intodask:mainfrom
jsignell:axis-none

Conversation

@jsignell
Copy link
Member

This fixes a FutureWarning that was coming from nightly pandas via numpy. While I was there, I also made some of the warning checking more precise in test_groupby.

import numpy as np
import pandas as pd

df = pd.DataFrame({"a": [1,2,3], "b": [2,4,6]})
np.min(df)
/home/julia/conda/envs/dask-upstream/lib/python3.9/site-packages/numpy/core/fromnumeric.py:84: FutureWarning: In a future version, DataFrame.min(axis=None) will return a scalar min over the entire DataFrame. To retain the old behavior, use 'frame.min(axis=0)' or just 'frame.min()'
  return reduction(axis=axis, out=out, **passkwargs)

a    1
b    2
dtype: int64

@jsignell jsignell merged commit cfdde62 into dask:main Jan 18, 2022
@jsignell jsignell deleted the axis-none branch January 18, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants