train = train.drop(['PassengerId', 'Name', 'Ticket'], axis=1, inplace=True)
If you type (train) before and after this function, It's changed from DataFrame to NoneType.
How do I do this? I don't know anything about Python.
python
inplace=True
Please check the Pandas document for the meaning of the factor. The first thing a beginner will learn is how to find and check documents.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop.html
© 2024 OneMinuteCode. All rights reserved.