无需转换为Python脚本,如何从带Docstring的Jupyter Notebook生成函数文档
以下是符合你指定规则的Markdown格式示例:
Markdown格式演示文档
文本格式
这是普通文本,其中包含斜体强调内容,以及单行代码/命令(比如cd project_dir)。
无序列表
- 列表项1:可结合强调和代码使用,比如重点注意事项和
关键命令 - 列表项2:支持换行,只需保持缩进一致
- 列表项3:嵌套列表示例
- 二级列表项1
- 二级列表项2
引用内容
这是一段引用文本,用于展示需要单独突出的内容,比如文档说明、引用的观点等。
多行引用时,每一行开头都要加上>符号。
多行代码块
对于完整的代码片段或函数,使用三个反引号包裹并指定语言:
def plot_calendar_map(df: pd.DataFrame, column: str, start_date: str, period_num: int, c_set: str = 'tab10') -> None: """Plot Calendar Maps for promotion run dates. Plots calendar maps indicating the days each promotion type has been active. In the current version, overlapping promotions will be overwritten by the latest in the dataframe. Args: df: DataFrame containing promotion details column: Name of the dataframe column that contains promotion codes/identifiers start_date: Start date of the plot period_num: Length of the duration in days c_set: Color map names - matplotlib colormaps are supported Returns: None Examples: >>> plot_calendar_map(df = df, column = 'promo_code', start_date = '2019-01-01', period_num = 365) """ pass
链接与图片
- 文本链接:链接显示文本
- 图片:
相关产品推荐
相关产品推荐

