Hello:
I have a CSV file (C:\Temp\NameList.CSV), it has exactly 20,000 records, like this:
First Name, Last Name (Field names)
John, Doe
......
Xyz, Fini
I want to read the CSV and convert it to dataframe, containing all 20000 records.
But I also want to add 2 columns to the dataframe.
One column, I want to add the 'index' to the records, for example, the first record in the CSV, get 1,
the second record in the CSV, get 2; ... until the last one record in the CSV, get 20000.
Another column, I want to add a 'Record Date', which is the date of today, and all 20000 records will get the same record.
Please advise how to code this in Python.
Thanks,
I have a CSV file (C:\Temp\NameList.CSV), it has exactly 20,000 records, like this:
First Name, Last Name (Field names)
John, Doe
......
Xyz, Fini
I want to read the CSV and convert it to dataframe, containing all 20000 records.
But I also want to add 2 columns to the dataframe.
One column, I want to add the 'index' to the records, for example, the first record in the CSV, get 1,
the second record in the CSV, get 2; ... until the last one record in the CSV, get 20000.
Another column, I want to add a 'Record Date', which is the date of today, and all 20000 records will get the same record.
Please advise how to code this in Python.
Thanks,