To read a single .csv
data file, we can simply use pd.read_csv()
. It takes the
Name,Designation Raj,Chief Technical Officer Sharad,Accountant Danish,Senior Web Developer Pawan,Senior Ux/Ui Developer Rijo Paul,Senior Web Developer Joseph,Senior Web Developer Aakash,Web Developer Ganesh,Ux/Ui Designer Vinudas,Web Developer Divya,Web Developer Joseph,QAA Sindhu,Web Developer Deepthi,QAA Lijin,Accountant
glob
: A Python module that is used to get all file paths that match a specific directory pattern.
main.py
glob
and pandas
.glob
instance with a specified file pattern .csv
. Here, the glob
module helps extract file directory (path + file name with extension),dataFrames
to keep every csv
as a DataFrame at each index of that list. pd.concat()
method to merge each DataFrame in the list by columns, that is, axis=1
. company.csv
employee.csv
Name
and Designation
.salary.csv
Name
, Medical Expenses
, Bonus
, TOTAL
, and Brand_Name
.RELATED TAGS
CONTRIBUTOR
View all Courses