Now I’m trying to learn about pandas package in python.
but using rename function, I have some problem.
mushroom = pd.read_csv('./mushroom/agaricus-lepiota.data', header=None)
mushroom = pd.DataFrame(mushroom)
mushroom.rename(columns={'0', 'edibility', '5', 'odor'})
I’m trying to rename column name 0, 5 to ‘edibility’, ‘odor’.
But I got It’s error, not allowed to get callable set function.
How can I fix it?
New contributor
John Philips is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.