I suggest use list comprehension with concat
:
import glob
import pandas as pd
files = glob.glob("TransactionData\Promorelevant*.csv")
dfs = [pd.read_csv(f, header=None, sep=";") for f in files]
salesdata = pd.concat(dfs,ignore_index=True)
More Related Contents:
- Import multiple csv files into pandas and concatenate into one DataFrame
- UnicodeDecodeError when reading CSV file in Pandas with Python
- How to add pandas data to an existing csv file?
- Writing a pandas DataFrame to CSV file
- Import CSV file as a pandas DataFrame
- How to make separator in pandas read_csv more flexible wrt whitespace, for irregular separators?
- datetime dtypes in pandas read_csv
- How to get rid of “Unnamed: 0” column in a pandas DataFrame read in from CSV file?
- What is the fastest way to upload a big csv file in notebook to work with python pandas?
- Pandas split column into multiple columns by comma
- python – Using pandas structures with large csv(iterate and chunksize)
- pandas DataFrame output end of csv
- OSError: Initializing from file failed on csv in Pandas
- Read CSV into a dataFrame with varying row lengths using Pandas
- How to add header row to a pandas DataFrame
- Is there a way to speed up handling large CSVs and dataframes in python?
- How do you remove the column name row when exporting a pandas DataFrame?
- Calculate summary statistics of columns in dataframe
- pandas dataframe with 2-rows header and export to csv
- UnicodeDecodeError when reading CSV file in Pandas
- How to upload a CSV file in FastAPI and convert it into a Pandas Dataframe?
- How to return a csv file/Pandas DataFrame in JSON format using FastAPI?
- pandas.read_csv FileNotFoundError: File b’\xe2\x80\xaa’ despite correct path
- start index at 1 for Pandas DataFrame
- Tilde sign in pandas DataFrame
- Drop columns whose name contains a specific string from pandas DataFrame
- Python Pandas How to assign groupby operation results back to columns in parent dataframe?
- Panda’s Write CSV – Append vs. Write
- Extract column value based on another column in Pandas
- Change the color of text within a pandas dataframe html table python using styles and css