如果列值为False,如何将插入或添加行拆分到现有数据框中

时间:2018-11-11 08:54:28

标签: python pandas

我尝试了索引append concat的索引,但是没有一种方法能够令人满意地在现有数据框中插入行
        total_rows = df_input_file.shape [0]         print(“总行数”,total_rows)

    dup_rows = df_input_file.RegName.duplicated()

    for row_index,row in df_input_file.iterrows():
        if dup_rows[row_index]== False:
            #Pseudo code: repeat the Row 

0 个答案:

没有答案
相关问题