Skip to content

Commit

Permalink
Removed whitespaces removal (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinpurtak authored Sep 30, 2024
1 parent a9710c9 commit 105f461
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/viadot/sources/sap_rfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,12 +1136,6 @@ def to_df(self, tests: dict | None = None) -> pd.DataFrame: # noqa: C901, PLR09
):
df_tmp = pd.DataFrame(columns=fields)
df_tmp[fields] = records
# SAP adds whitespaces to the first extracted column value.
# If whitespace is in unique column, it must be removed to make
# a proper merge.
for col in self.rfc_unique_id:
df_tmp[col] = df_tmp[col].str.strip()
df[col] = df[col].str.strip()
df = pd.merge(df, df_tmp, on=self.rfc_unique_id, how="outer")
elif not start:
df[fields] = records
Expand Down

0 comments on commit 105f461

Please sign in to comment.