dataset = pd.read_csv("dataset.csv").fillna(" ")[:100]
dataset['Id']=0
dataset['i']=0
dataset['j']=0
#...
entries=dataset[dataset['Id']==0]
print type(entries) # Prints <class 'pandas.core.frame.DataFrame'>
entries=entries.sort_values(['i','j','ColumnA','ColumnB'])
What might be the possible reason of the following error message at the last line?:
AttributeError: 'DataFrame' object has no attribute 'sort_values'
Hello sort_values
is new in version 0.17.0, so check your version of pandas.
In the previous versions you should use sort
.
entries=entries.sort(['i','j','ColumnA','ColumnB'])
Check pandas version, In new versions uses sort_values
in place of sort.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With