Reputation: 11
The code should read the column names from a csv file and I want to append the column names to %%column name. For example: empid, Name, salary so the output should be %%empid Name salary. But the name of the columns will change as different csv will have different column names.
Upvotes: 1
Views: 514
Reputation: 42875
This could be accomplished by:
df = read_csv(path)
df.columns = ['%%{}'.format(c) for c in df.columns]
Upvotes: 2