Python folium 地图和 jupyter 笔记本单元之间的白色间隙

oli*_*oun 10 python folium

如何消除 Python folium 地图和 jupyter 笔记本内的下一个单元格之间不需要的间隙。这是重现我的问题的简单代码:

import folium
m = folium.Map(width=600, height=400, location=[12, 12], zoom_start=2)
m
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

oli*_*oun 14

这里解决方法需要用到图:

from branca.element import Figure
fig = Figure(width=600, height=400)
m = folium.Map(location=[12, 12], zoom_start=2)
fig.add_child(m)
Run Code Online (Sandbox Code Playgroud)