我下面的代码是一个熊猫数据框,我尝试使用transcypt和flask在浏览器中查看此代码,但是遇到了错误。任何帮助将不胜感激。
import pandas as pd
columns = ['cap', 'title', 'price']
df = pd.read_csv('asdawhiskey.csv', names=columns)
items = df[df['cap'] == '70cl']
print(items.to_html())
答案 0 :(得分:2)
尝试Streamlit。 https://streamlit.io 您不必写一行html
len(all_items): 192
然后运行import streamlit as st
import pandas as pd
columns = ['cap', 'title', 'price']
df = pd.read_csv('asdawhiskey.csv', names=columns)
items = df[df['cap'] == '70cl']
st.write(items)