Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Filling a missing value in a pandas data frame with an if statement based on a condition

d = {4710:41.5188, 4711:41.5288...}
CA_LOCATION['LATITUDE'] = CA_LOCATION['LATITUDE'].fillna(CA_LOCATION.CNTY_CITY_LOC.map(d))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Filling #missing #pandas #data #frame #statement #based #condition
ADD COMMENT
Topic
Name
5+5 =