jer164 commited on
Commit
cb2c213
·
1 Parent(s): 6f988c8

fixed string reversing

Browse files
src/tranformers/state_transforms.py CHANGED
@@ -651,9 +651,9 @@ class WV(StateTransformer):
651
  'full_address', 'type', 'donation_amount', 'expenditure_purpose']
652
  def parse_names(name: str) -> str:
653
  if "," in name:
654
- return name.split(", ")[::1]
655
  return name
656
- input_df["full_name"] = input_df["full_name"].str.split(", ").str.join(" ")
657
  return input_df
658
 
659
 
 
651
  'full_address', 'type', 'donation_amount', 'expenditure_purpose']
652
  def parse_names(name: str) -> str:
653
  if "," in name:
654
+ return name.split(", ")[::-1]
655
  return name
656
+ input_df["full_name"] = input_df["full_name"].apply(parse_names)
657
  return input_df
658
 
659