Closed kuriwaki closed 3 years ago
The problem is, the code was written with 0.2.1, and I released 0.3.0 just a few days ago. i would recommend to update the script like this:
>>> import io
>>> import pandas as pd
>>> from pyDataverse.api import NativeApi
>>>
>>> doi = "doi:10.7910/DVN/HIDLTK"
>>> base_url = "https://dataverse.harvard.edu"
>>> api = NativeApi(base_url)
>>> resp = api.get_dataset(doi)
Please tell me, if this works now.
That works - thank you. I should have remembered that the versions were different.
I edited the Gist and the first half now works but I'm hitting issues now with the second half involving pd.read_csv
where the last line appears to be printing metadata not the first 10 rows of the dataset. But that's a different issue from the title of this issue so I can also file another one.
Never mind, the separate question is now filed in #80.
Python novice here trying to reproduce the import CSV code from datafest last month.
I get the following after installing pyDataverse today with
pip3
. What am I doing wrong and how do I complete the rest of the import script?I manually copied and pasted the python code @skasberger gave in his slides in this gist - maybe I made typos.