Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ValueError:序列的真值不明确。使用a.empty、a.bool()、a.item()、a.any()或a.all_Python_Pandas - Fatal编程技术网

Python ValueError:序列的真值不明确。使用a.empty、a.bool()、a.item()、a.any()或a.all

Python ValueError:序列的真值不明确。使用a.empty、a.bool()、a.item()、a.any()或a.all,python,pandas,Python,Pandas,我需要Close column的值,如果该值为true,则该值应该有效,但您没有提供完整的代码,因此很难知道它是否是您想要的。 df=df[df['Close']>supertrend]Close似乎是一个关键词。。因此,尝试使用df[“close”]并尝试比较请提供数据示例。你的答案就在这里:数据图像的可能重复 import pandas as pd import csv df = pd.read_csv('niftsuper50.csv') close = df.C


我需要Close column的值,如果该值为true,则该值应该有效,但您没有提供完整的代码,因此很难知道它是否是您想要的。
df=df[df['Close']>supertrend]

Close似乎是一个关键词。。因此,尝试使用df[“close”]并尝试比较

请提供数据示例。你的答案就在这里:数据图像的可能重复
 import pandas as pd
    import csv
    df = pd.read_csv('niftsuper50.csv')
    close = df.Close
    supertrend = df.st

    if (close > supertrend):
        print (close)