Here is the scenario.
Millions of data from source.
I'd like to get a sample 10k records only.
df = record.head(10000)
Search the 10k records. Get the first record who's specific column is not null.
df[~df['af_ad_id'].isnull()].head(1)
This is returning an error -- AttributeError: 'NoneType' object has no attribute 'isnull'.
CodePudding user response:
Your getting that error because df['af_ad_id']
is of type None
CodePudding user response:
Let try df[~df['af_ad_id'].isnull()][0]