pandas 几个重要知识点
将 NaN 替换成某一数值
使用 fillna 
dataframe.fillna(value = 'xxx',inplace=True)
删除某一个值
使用 drop 
dataframe.drop(10,inplace=True)
交换两行的值
    if m != n:
        temp = np.copy(dataframe[m])
        dataframe[m] = dataframe[n]
        dataframe[n] = temp
    else:
        temp = np.copy(dataframe[dataframe.shape[1]-1])
        dataframe[dataframe.shape[1]-1] = dataframe[n]
        dataframe[n] = temp
删除 columns 这些列
    dataframe.drop(columns = list, inplace=True)
2020-05-29
本文来自博客园,作者:Hany47315,转载请注明原文链接:https://www.cnblogs.com/hany-postq473111315/p/12989028.html
                    
                
                
            
        
浙公网安备 33010602011771号