mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
feat: generate label map on the backend (#21124)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user