I need to convert all columns of a csv file into str while reading with Pandas in python. What is the most efficient way to write this code?
df = pd.read_csv("datafile.csv", sep = "\s+", names = ["lvl12",
"etime", "press", "gph", "temp", "rh", "dpdp", "wdir", "wspd"])
df['lvl12'].astype(str)
df['etime'].astype(str)
df['press'].astype(str)
df['gph'].astype(str)
df['temp'].astype(str)
df['rh'].astype(str)
df['dpdp'].astype(str)
df['wdir'].astype(str)
df['wspd'].astype(str)