jer164 commited on
Commit
8080d06
·
1 Parent(s): 5b03ebf

fixed maryland

Browse files
Files changed (1) hide show
  1. src/tranformers/state_transforms.py +1 -16
src/tranformers/state_transforms.py CHANGED
@@ -325,22 +325,7 @@ class MA(StateTransformer):
325
 
326
  class MD(StateTransformer):
327
  def format_data(self, input_df: pd.DataFrame, **kwargs) -> pd.DataFrame:
328
- input_df = input_df
329
- input_df["address_dicts"] = input_df["contributor_address"].apply(
330
- lambda x: (
331
- normal_address(address_parse_attempt(x)) if isinstance(x, str) else None
332
- )
333
- )
334
- for k in input_df["address_dicts"][0].keys():
335
- input_df[k] = input_df["address_dicts"].apply(lambda x: x[k] if x else None)
336
-
337
- input_df["first_name"] = (
338
- input_df["full_name"].str.split(r"\s{2}", regex=True).str[1]
339
- )
340
- input_df["last_name"] = (
341
- input_df["full_name"].str.split(r"\s{2}", regex=True).str[0]
342
- )
343
- input_df.drop("full_name", inplace=True, axis=1)
344
  return input_df
345
 
346
 
 
325
 
326
  class MD(StateTransformer):
327
  def format_data(self, input_df: pd.DataFrame, **kwargs) -> pd.DataFrame:
328
+ input_df["full_name"] = input_df["full_name"].apply(lambda x: x.split(" ")[::-1])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  return input_df
330
 
331