I am a newbie in DS world, right now i am working on some EDA practice, and run into an issue here.
Here is my code:
Convert some columns to numeric values
for column in cols:
auto[column] = pd.to_numeric(auto[column]
return auto
auto = read_auto_data()
- error 1: File "", line 4 return auto ^ SyntaxError: 'return' outside function
I tried to change return's indent:
Convert some columns to numeric values
for column in cols:
auto[column] = pd.to_numeric(auto[column])
return auto
auto = read_auto_data()
- error 2: TypeError Traceback (most recent call last) in () 1 ## Convert some columns to numeric values 2 for column in cols: ----> 3 auto[column] = pd.to_numeric(auto[column]) 4 return auto 5
TypeError: 'function' object is not subscriptable
Can anyone help me understand what went wrong here?
Thanks
return
statement. $\endgroup$