df_int¶
pandas.Dataframe integration
This module helps transform pandas.DataFrame to Restructured Text List Table. It allows user to embed code block in the table.
-
diablo2_doc.helpers.df_int.
convert_to_codeblock_python
(value: str) → rstobj.directives.codeblock.CodeBlockBase[源代码]¶ 将字符串转化为 CodeBlockPython 对象.
-
diablo2_doc.helpers.df_int.
df_to_list_table
(df: pandas.core.frame.DataFrame, title: str = '', code_column_and_transform_func: Dict[str, Callable] = None) → rstobj.directives.table.ListTable[源代码]¶ 将 DataFrame 转化成 Rst 中的 List Table 对象.
参数: - df --
- title -- Title
- code_column_and_transform_func -- key: column name, value: None, or a simple text transform function, should take a row as the single argument
返回类型: ListTable