Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
You can use the method
Series.astype
to cast the type of a series.Series.astype(str)
convertsNaN
s to the string literalnan
. This is often NOT what people want. A better way is to useSeries.astype(object)
instead.