I have two pandas series as shown below,
df1 =
index value
2014-05-23 00:00:00 NaN
2014-05-23 01:00:00 NaN
2014-05-23 02:00:00 0.00
2014-05-23 03:00:00 NaN
...
2018-01-01 05:00:00 0.59
2014-01-01 06:00:00 0.43
2014-01-01 07:00:00 1.00
and df2
df2 =
index value
2014-05-23 00:00:00 9.9
2014-05-23 01:00:00 23
2014-05-23 02:00:00 4.3
2014-05-23 03:00:00 10.6
...
2018-01-01 05:00:00 8.3
2014-01-01 06:00:00 0.3
2014-01-01 07:00:00 0.0
and relationship between df1 and df2 is one by one , I would like to plot the figure with x value (df1) and y value (df2) but only choose the value in df1 bigger than 0 and smaller than 1 (directly ignore the NaN).
I just know how to find the value with one condition
df.loc[lambda df: df != 1] or df.loc[lambda df: df != 0]
but it doesn't work when I write
df.loc[lambda df: df != 1 and != 0] or df.loc[lambda df: 1> df > 0]
and I don't know how to match the values found in df1 to df2, in order to plot it.
Anyone have ideas? Thanks in advance !