Code Sample, a copy-pastable example if possible
import numpy as np
import pandas as pd
df = pd.DataFrame.from_dict({'a': [1, 2], 'f':[3, 4]})
print(df.min(axis=None))
print(np.min(df, axis=None))
Problem description
Similar to numpy I would expect the function to return the total min or max for axis=None
(a scalar).
The function returns a Series with one value per column instead.
As the same happens with np.min, the problem could also be connected to numpy.
If this behavior is intended, I would suggest changing the default of axis to 0.
Expected Output
Output of pd.show_versions()
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 36.4.0
Cython: None
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: 1.1.13
pymysql: 0.7.9.None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
Comment From: jreback
you can do this.
In [10]: np.max(df.values)
Out[10]: 4
In [11]: df.max().max()
Out[11]: 4
This is not a very common operation compared to column-wise axis (which default to 0, IOW the axis which you operate over)