[英]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.