【问题标题】:When importing into Google Collab: TypeError: 'str' object is not callable导入 Google Collab 时:TypeError: 'str' object is not callable
【发布时间】:2022-01-16 08:50:30
【问题描述】:

在 google colaboratory 中使用 pandas,我正在尝试导入一个名为“gifted.csv”的 .csv 文件。使用以下代码:

df=pd.read_csv('/content/gifted.csv')

我已经以 pd 的身份运行了 pandas 库,但是每当我运行代码时,它都不起作用,并且出现以下错误。 enter code hereTypeError: 'str' object is not callable

【问题讨论】:

标签: python pandas google-colaboratory


【解决方案1】:

我不知道 csv 的位置,但请尝试

df=pd.read_csv('content/gifted.csv')

内容前没有'/'

错误并不意味着它,但尝试它。

更多检查导入是否安装良好。

【讨论】:

    猜你喜欢
    • 2016-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-19
    • 2023-03-18
    • 2021-04-21
    • 2011-04-26
    相关资源
    最近更新 更多