![](/img/trans.png)
[英]How to divide one column by another where one dataframe's column value corresponds to another dataframe's column's value in Python Pandas?
[英]How to divide a column into 5 groups by the column value sorted, and then add column's
如何按列的值将列分为5组。
并按组添加一列
例如
import pandas as pd
df = pd.DataFrame({'x1':[1,2,3,4,5,6,7,8,9,10]})
我想添加像这样的列:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.