This is probably super simple but I just can not find the answer. I import data using GeoPandas from a shape file. Turn that into pandas DataFrame
. I have a object field with three letter codes and None
values for missing data. How do I change None
's to something like "vcv" in pandas? I tried this
sala.replace(None,"vcv")
got this error
2400 "strings or regular expressions, you "
2401 "passed a"
-> 2402 " {0!r}".format(type(regex).__name__))
2403 return self.replace(regex, value, inplace=inplace, limit=limit,
2404 regex=True)
TypeError: 'regex' must be a string or a compiled regular expression or a list or dict of strings or regular expressions, you passed a 'bool'
Tried this
if sala['N10'] is None:
sala['N10'] = 'Nul'
Does not change anything.