When the value of just my luck is nan, delete the two lines of Jack Matthews and Micheal Phillips
Two methods: 1. Delete the line where just my luck is NaN
indexs = list(df[np.isnan(df['just my luck'])].index) df = df.drop(indexs)
2. Get the row where just my luck is not NaN
df = df[np.isnan(df['just my luck']) == False]
df = df.dropna(subset=["just my luck"])
Two methods:
1. Delete the line where just my luck is NaN
2. Get the row where just my luck is not NaN