📜  python 如果数据框至少有一行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:10.937000             🧑  作者: Mango

代码示例1
filtered_df = my_df.loc[my_df['ColA'] == myvalue] #calculated df

if len(filtered_df.index) > 0: # if the df has at least one row
    # your code here