Open
Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
I'd like this warning of pd.concat()
be solved with an argument
FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
return pd.concat(orders_for_plotting)
Feature Description
I mean instead of changing my code to something like
result = pd.concat([df for df in [df1, df2] if not df.empty])
I think it'd be cool to have arguments like ignore_empty: bool = True
and ignore_all_na: bool = True
(which would turn into = False
in the future) in pd.concat
, so I'd be all good by just adding one argument in my codebase to deal with the future behavior.
Alternative Solutions
An alternative solution would be not doing this and making people change their code to keep their legacy stuff intact
Additional Context
No response