Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

str replace pandas

>>> pd.Series(['foo', 'fuz', np.nan]).str.replace('f.', 'ba', regex=True)
0    bao
1    baz
2    NaN
dtype: object
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #str #replace #pandas
ADD COMMENT
Topic
Name
5+7 =