#Dataframe.drop function help in python

1 messages · Page 1 of 1 (latest)

halcyon swift
#

The value 1 it's assigning itself to needs to be named. I have a feeling it should be df.drop(['body','name'], axis=1, inplace=True)

eternal plover
#

Yep now it runs but I think this tutorial has a lot of different things its not showing

halcyon swift
#

Might be outdated compared to the package used ¯_(ツ)_/¯

eternal plover
#

the tutorial also has a df.convert_objects(convert_numeric=True) function as well which doesnt exist but im gonna have to find another one thanks though

#

its crazy bc this is the resource given to me by instructor lol

halcyon swift
#

For you to actually learn and understand why you need to name the parameter.
There's positional, and keyword parameters in python.
Given dataframe.drop's signature being:
DataFrame.drop(labels=None, *, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise')
The * in the parameter list marks the end of positional parameters, everything after that is forced as a keyword parameter and needs to be named to be passed.

eternal plover
#

okay gotcha thanks

#

Would you by chance know a good resource i can use to implement a supervised and unsupervised program?

halcyon swift
#

I have no idea what you mean by either of those, so no

eternal plover
#

Ah okay

#

I have no python knowledge and my teacher forces us to use it but ill figure it out