无法加载graphlab.sframe

时间:2018-01-04 17:43:01

标签: python machine-learning graphlab

我已加入关于课程的机器学习课程。我在执行以下命令时遇到问题:

    sales = graphlab.SFrame('home_data.gl/')

错误如下:

IOError                             Traceback (most recent call last)
<ipython-input-9-e5b5a1ead746> in <module>()
----> 1 sales = graphlab.SFrame('home_data.gl')


C:\Users\admin\Anaconda2\envs\gl-env\lib\site-packages\graphlab                         
\data_structures\sframe.pyc in __init__(self, data, format, _proxy)
951                     pass
952                 else:
--> 953                     raise ValueError('Unknown input type: ' + format)
954 
955         sframe_size = -1

C:\Users\admin\Anaconda2\envs\gl-env\lib\site-packages\graphlab\cython\context.pyc in __exit__(self, exc_type, exc_value, traceback)
 47             if not self.show_cython_trace:
 48                 # To hide cython trace, we re-raise from here
 ---> 49                 raise exc_type(exc_value)
 50             else:
 51                 # To show the full trace, we do nothing and let      exception propagate

 IOError: Cannot open C:/Users/admin/home_data.gl/dir_archive.ini for read. Cannot open C:/Users/admin/home_data.gl/dir_archive.ini for reading

你能帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

转到终端并运行:

unzip home_data.gl.zip

您将在目录 home_data.gl

中看到以下文件

enter image description here

现在在ipython中,运行:

sales = graphlab.SFrame('home_data.gl/')
sales

将以表格格式显示数据:

enter image description here