DataFrame

分割某一列

data['HEADER_BEGIN'].str.split(',', expand=True)

分组

fill_data_x=[]
for key,group in all_data_x.groupby('Elapsed'):
    group['curr_p'] = group['curr_p'].fillna(group['curr_p'].mean())
    group['pressu'] = group['pressu'].fillna(group['pressu'].mean())
    fill_data_x.append(group)

筛选满足条件的行

machine_work_list = ['PVD','PHT','DET','STR','PDC','CVD','RTA','ELA','IMP','ANH','ANN','WET','PIL','PAS','ODF']
machine_line = machine_line[machine_line['MACHINENAME'].str[2:5].isin(machine_work_list)]

众数填充

for columns_id in normal_product_df.columns:
normal_product_df[columns_id] = normal_product_df[columns_id].fillna(normal_product_df[columns_id].mode()[0])

上一篇:常用的css属性


下一篇:Echarts实现折线图