Skip to content

Commit

Permalink
using DataFrame.map since DataFrame.applymap has been deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
odysseu authored Sep 21, 2023
1 parent 781fc82 commit a2060f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs_table_reader_plugin/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def convert_to_md_table(df: pd.DataFrame, markdown_kwargs: Dict) -> str:
# Escape any pipe characters, | to \|
# See https://github.com/astanin/python-tabulate/issues/241
df.columns = [replace_unescaped_pipes(c) for c in df.columns]
df = df.applymap(lambda s: replace_unescaped_pipes(s) if isinstance(s, str) else s)
df = df.map(lambda s: replace_unescaped_pipes(s) if isinstance(s, str) else s)

if "index" not in markdown_kwargs:
markdown_kwargs["index"] = False
Expand Down

0 comments on commit a2060f4

Please sign in to comment.