如何使用被子回购?

时间:2019-02-14 13:03:54

标签: python

这是我的被子代码:

import quilt
import pandas as pd
import numpy
quilt.build("bussiere/test", "quilt")
from quilt.data.bussiere import test
ar = numpy.array([[1.1, 2, 3.3, 4], [2.7, 10, 5.4, 7], [5.3, 9, 1.5, 15]])
df = pd.DataFrame(ar, index = ['a1', 'a2', 'a3'], columns = ['A', 'B', 'C', 'D'])
test._set(["Rue"],df)
quilt.build("bussiere/test", "quilt")
quilt.login()
quilt.push("bussiere/test",is_public=True)

这是结果:

https://quiltdata.com/package/bussiere/test

但是当我尝试使用它时:

import quilt
#quilt.install("bussiere/test")
from quilt.data.bussiere import test
test.Rue()

我有一个:

--------------------------------------------------------------------------- KeyError                                  Traceback (most recent call last) ~/.local/share/virtualenvs/GeoMasterMicro-uG6MrMuJ/lib/python3.7/site-packages/quilt/nodes.py in __getattr__(self, name)
     97             try:
---> 98                 return self[name]
     99             except KeyError:

~/.local/share/virtualenvs/GeoMasterMicro-uG6MrMuJ/lib/python3.7/site-packages/quilt/nodes.py in __getitem__(self, name)
    128     def __getitem__(self, name):
--> 129         return self._children[name]
    130 

KeyError: 'Rue'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last) <ipython-input-2-6affced56dbe> in <module>
      2 #quilt.install("bussiere/test")
      3 from quilt.data.bussiere import test
----> 4 test.Rue()

~/.local/share/virtualenvs/GeoMasterMicro-uG6MrMuJ/lib/python3.7/site-packages/quilt/nodes.py in __getattr__(self, name)
     98                 return self[name]
     99             except KeyError:
--> 100                 raise AttributeError
    101 
    102     def __setattr__(self, name, value):

AttributeError:

如何导入被子数据?

还有如何通过被子自动登录而无需复制粘贴代码以将被子代码嵌入程序中?

致谢

0 个答案:

没有答案