0

I want to combine many CSV files in one CSV file but it through me error this is my code

data_files=sorted(glob('C://Users//Home//Desktop//CSIC 2017//MachineLearningCVE//data*.csv'))
data_files
dfList = []
for data_file in data_files:
    df = pd.read_csv(data_file, header=None)
    dfList.append(df)

this is the error

C:\Users\Home\AppData\Local\Temp\ipykernel_7624\4284368016.py:3: DtypeWarning: Columns (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76) have mixed types. Specify dtype option on import or set low_memory=False.
  df = pd.read_csv(data_file, header=None)
Matt Evans
  • 7,113
  • 7
  • 32
  • 64
  • 1
    Does this answer your question? [Pandas read\_csv: low\_memory and dtype options](https://stackoverflow.com/questions/24251219/pandas-read-csv-low-memory-and-dtype-options) – Matt Evans Dec 22 '22 at 08:50

0 Answers0