Pandas Cut 与dataframe随机抽取(sample)替换(replace)应用案例
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltplt.rcParams['font.sans-serif'] = ['STFangsong']plt.rcParams['axes.unicode_minus'] = False%config InlineBackend.figure_format = 'svg'cut 使用df = pd.read_csv('../files/data/2018年北京