pd.concat accepts iterables that may contain Series, DataFrame and None, where None are simply ignored.
pd.concat([None, series, None, series, None]) # works, same as pd.concat([series, series])
pd.concat([None]) # raises
It would be great to deprecate/remove accepting Nones. This will help to better annotate concat pandas-dev/pandas-stubs#888
Pandas-stubs currently has to choose between either false-positives (accept concat([None]) ) or false-negatives (reject some concat(Iterable[Any/Unknown]) that could succeed).
pd.concataccepts iterables that may containSeries,DataFrameandNone, whereNoneare simply ignored.It would be great to deprecate/remove accepting
Nones. This will help to better annotateconcatpandas-dev/pandas-stubs#888Pandas-stubs currently has to choose between either false-positives (accept
concat([None])) or false-negatives (reject someconcat(Iterable[Any/Unknown])that could succeed).