'Selecting column in dataframe within a range

I am working on dataframes in Python. I have original dataframe for 10 days. I have divided that dataframe for each day and trying to plot. I have some strange values in some columns(here y and z) ,so I am trying to use 'between method' to specify my range (0,100). The code is working, but I am getting warning. Can anyone help me please ?

for df  in ((listofDF)):
    if len(df) != 0:
        f_df = df[df[' y'].between(0,100)]
        f_df = f_df[df[' z'].between(0,100)]
        maxTemp = f_df[' y']
        minTemp = f_df[' z']
        Time = f_df['x']
        plt.plot(x,y)
        plt.plot(x,z)
        

The warning I am getting is, UserWarning: Boolean Series key will be reindexed to match DataFrame index. f_df = f_df[df[' y'].between(0,100)]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source