导入错误:无法从“streamlit.type_util”导入名称“convert_anything_to_df”

问题描述 投票:0回答:1
import streamlit as st
import pandas as pd


from streamlit_gsheets import GSheetsConnection

url = "https://docs.google.com/spreadsheets/d/1JDy9md2VZPz4JbYtRPJLs81_3jUK47nx6GYQjgU8qNY/edit?usp=sharing"

conn = st.experimental_connection("gsheets", type=GSheetsConnection)

data = conn.read(spreadsheet=url, usecols=[0, 1])
st.dataframe(data)`

我收到以下错误:

from streamlit_gsheets.gsheets_connection import GSheetsConnection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'convert_anything_to_df' from 'streamlit.type_util'

我已经重新安装了所需版本的 numpy、streamlit 和 pandas 。 我还重新安装了 st_gsheets_connection

我只需要它从电子表格中获取数据。

版本-: 蟒蛇3.11.4 熊猫2.2.2 numpy 1.26.2 流线型 1.37.0

google-sheets streamlit
1个回答
-1
投票

您最终使用了哪些版本?

© www.soinside.com 2019 - 2024. All rights reserved.