To read a single .csv
data file, we can simply use pd.read_csv()
. It takes the
Name,DesignationRaj,Chief Technical OfficerSharad,AccountantDanish,Senior Web DeveloperPawan,Senior Ux/Ui DeveloperRijo Paul,Senior Web DeveloperJoseph,Senior Web DeveloperAakash,Web DeveloperGanesh,Ux/Ui DesignerVinudas,Web DeveloperDivya,Web DeveloperJoseph,QAASindhu,Web DeveloperDeepthi,QAALijin,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
.