1.pandas中的列的分位数

# 查看列的分位数
import pandas as pd
# set columns type
my_df['col'] = my_df['col'].astype(np.float64)

# computations for 4 quantiles : quartiles
bins_col = pd.qcut(my_df['col'], 4)
bins_col_label = pd.qcut(my_df['col'], 4).labels
分位数

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2021-12-26
  • 2021-10-20
  • 2021-05-30
  • 2021-11-23
  • 2021-12-30
猜你喜欢
  • 2022-01-24
  • 2021-08-07
  • 2022-02-28
  • 2021-08-24
  • 2022-12-23
  • 2021-04-05
  • 2021-10-03
相关资源
相似解决方案