'DataFrame' object has no attribute 'sort_yalues'
时间: 2023-09-03 18:06:40 浏览: 173
Pandas DataFrame Notes
It seems like you are trying to call the `sort_values` attribute on a DataFrame object, but you have a typo in the attribute name. The attribute name is `sort_values`, not `sortalues`.
To sort the values in a DataFrame you can use the `sort` method. Here's example:
```python
import as pd
# Create sample DataFrame
df =.DataFrame({'A': [3, , 2], 'B [2, 4 3]})
# Sort the values in column 'A' in ascending order
df_sorted = df.sort_values('A')
print(df_sorted)
```
This will output the DataFrame with values sorted based on column 'A'.
阅读全文