-
-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Closed
Description
I am getting error in renaming the columns
CODE:
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
url="C:/Users/Lenovo/Desktop/Edited_car1.csv"
car=pd.read_csv(url)
drive_wheels_count=car["drive-wheels"].value_counts()
drive_wheels_count.rename(columns={'drive-wheels':'value_count'},inplace=True)
ERROR:
runfile('C:/Users/Lenovo/.spyder-py3/untitled0.py', wdir='C:/Users/Lenovo/.spyder-py3')
Traceback (most recent call last):
File "C:\Users\Lenovo.spyder-py3\untitled0.py", line 7, in
drive_wheels_count.rename(columns={'drive-wheels':'value_count'},inplace=True)
TypeError: rename() got an unexpected keyword argument 'columns'
SCREENSHOTS:
Metadata
Metadata
Assignees
Labels
No labels
