1、图像
from IPython.display import display, Image
path = r"C:\Us***绍.jpg"
img = Image(path)
display(img)
2、音频
from IPython.display import Audio,display
sound_file = '../taobao427.mp3'
display(Audio(sound_file))
3、视频
src为相对路径
# ########## display
from IPython.display import display, HTML
html_str = '''
<video controls width=\"500\" height=\"500\" src=\"{}\">animation</video>
'''.format("./dataset/vid****8726.mp4")
print(html_str)
display(HTML(html_str))
4、lux jupyter在线图像显示
参考https://github.com/lux-org/lux#
1、安装
!pip install lux-api
2、设置
!jupyter nbextension install --py luxwidget
!jupyter nbextension enable --py luxwidget
3、使用
import pandas as pd
import lux
csv1 = pd.read_csv(r"C:\Us%***nds1.csv")
csv1