'NoneType' object has no attribute `fips` in JupyterLab

Viewed 63

I am trying to remove 42045 from FIPS column. Here are some Python codes I used:

`data_fips=pd.merge(covidData,electionData,left_on='fips',right_on='fips',how='inner')`

`data_fips_update=data_fips[data_fips.fips=="42045"]`
or
`data_fips=data_fips[data_fips.fips!="42045"].copy`

Last two codes I used to try to remove FIPS 42045 and this is the error I am getting:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_18516/2297872553.py in <module>
----> 1 data_fips_update=data_fips[data_fips.fips=="42045"].copy()

AttributeError: 'NoneType' object has no attribute 'fips'

Please advise on how I can resolve this issue.

0 Answers
Related