Description
-
[ X ] I have checked that this issue has not already been reported.
-
[ X ] I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
df = pd.concat(
(
pd.read_csv(os.path.join(dirpath, filename))
for dirpath, filename in file_generator
),
ignore_index=True,
)
Problem description
A subgroup of my files can cause the above function to break. And it happens 100% with those files with pandas1.2.0, with 1.1.5 no problem.
[this should explain why the current behaviour is a problem and why the expected output is a better solution]
Expected Output
Output of pd.show_versions()
[paste the output of pd.show_versions()
here leaving a blank line after the details tag]
pandas : 1.2.0
numpy : 1.19.5
pytz : 2020.5
dateutil : 2.8.1
pip : 20.2.2
setuptools : 49.1.3
Cython : 0.29.21
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: 0.9.0
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : 0.8.7
xarray : None
xlrd : None
xlwt : None
numba : None