I have a data set in which negative values exist, these are indicative of incorrect measurements.
I've tried to set these values to 0 using:
gTemp36[gTemp36['S22 50cm'] < -99]= 0
However when I try to plot this data the graph doesn't plot correctly as shown here (the graph on the right).
I've tried using .dropna()
on the DataFrame
before plotting but it doesn't seem to improve things, does anybody have any suggestions?
Thanks
set them to nan
instead of zero, your plot correctly plots them at zero.
I have a data set in which negative values exist, these are indicative of incorrect measurements.
I've tried to set these values to 0 using:
gTemp36[gTemp36['S22 50cm'] < -99]= 0
However when I try to plot this data the graph doesn't plot correctly as shown here (the graph on the right).
I've tried using .dropna()
on the DataFrame
before plotting but it doesn't seem to improve things, does anybody have any suggestions?
Thanks
set them to nan
instead of zero, your plot correctly plots them at zero.
0 commentaires:
Enregistrer un commentaire