diff --git a/pandas_usaddress/__init__.py b/pandas_usaddress/__init__.py index 14bd25c..44d8af7 100644 --- a/pandas_usaddress/__init__.py +++ b/pandas_usaddress/__init__.py @@ -91,6 +91,7 @@ def tag(dfa, address_columns, granularity='full', standardize=False): for i in address_columns: df[i].fillna('', inplace=True) df['odictaddress'] = df['odictaddress'].str.cat(df[address_columns].astype(str), sep=" ", na_rep='') + df['odictaddress'] = df['odictaddress'].str.replace(',', ' ') df['odictaddress'] = df['odictaddress'].str.replace('[^\w\s\-]','') df['odictaddress'] = df['odictaddress'].apply(lambda x: trim(x)) df['odictaddress'] = df['odictaddress'].apply(lambda x: lowercase(x)) @@ -269,4 +270,4 @@ def tag(dfa, address_columns, granularity='full', standardize=False): df = df.replace({'None': np.nan, 'none': np.nan, 'nan': np.nan, 'NaN': np.nan, None: np.nan, '': np.nan}).copy() - return df \ No newline at end of file + return df