feat: generate label map on the backend (#21124)

This commit is contained in:
Yongjie Zhao
2022-08-22 21:00:02 +08:00
committed by GitHub
parent 756ed0e36a
commit 11bf7b9125
8 changed files with 154 additions and 2 deletions

View File

@@ -198,3 +198,13 @@ def _append_columns(
return _base_df
append_df = append_df.rename(columns=columns)
return pd.concat([base_df, append_df], axis="columns")
def escape_separator(plain_str: str, sep: str = FLAT_COLUMN_SEPARATOR) -> str:
char = sep.strip()
return plain_str.replace(char, "\\" + char)
def unescape_separator(escaped_str: str, sep: str = FLAT_COLUMN_SEPARATOR) -> str:
char = sep.strip()
return escaped_str.replace("\\" + char, char)