Plot pandas dataframe containing NaNs

后端 未结 4 568
星月不相逢
星月不相逢 2020-12-09 16:23

I have GPS data of ice speed from three different GPS receivers. The data are in a pandas dataframe with an index of julian day (incremental from the start of 2009).

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 17:15

    Here is another way:

    nan_columns = []
    nan_values = []
    
    for column in dataset.columns:
        nan_columns.append(column)
        nan_values.append(dataset[column].isnull().sum())
    
    fig, ax = plt.subplots(figsize=(30,10))
    plt.bar(nan_columns, nan_values)
    

提交回复
热议问题