DataFrame.apply fails for string function arguments with additional positional or keyword arguments #22376
Labels
Bug
Numeric Operations
Arithmetic, Comparison, and Logical operations
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
Code sample
Problem description
When we use the
DataFrame.apply
method with a string function argument (e.g. 'sum') and provide additional positional or keyword arguments it fails with the following exception:but works just fine without additional arguments. The code above fails in master.
Expected Output
Output of
pd.show_versions()
pandas: 0.24.0.dev0+469.g70e6f7c3c
pytest: 3.7.1
pip: 10.0.1
setuptools: 40.0.0
Cython: 0.28.5
numpy: 1.15.0
scipy: 1.1.0
pyarrow: 0.9.0
xarray: 0.10.8
IPython: 6.5.0
sphinx: 1.7.6
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.7
feather: 0.4.0
matplotlib: 2.2.3
openpyxl: 2.5.5
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.5
lxml: 4.2.4
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.10
pymysql: 0.9.2
psycopg2: None
jinja2: 2.10
s3fs: 0.1.5
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 0.1.1
The text was updated successfully, but these errors were encountered: