- Hands-On Data Science with Anaconda
- Dr. Yuxing Yan James Yan
- 149字
- 2021-06-25 21:08:51
Introduction to the datadotworld Python package
To install the datadotworld Python package, follow these steps:
- First, we have to install the package. To do so, we could try one of the following lines:
conda install datadotworld pip install datadotworld
- After the package is successfully installed, we can use the dir() function to list all its functions, as shown in this screenshot:

- A user has to get an APK token at https://data.world/settings/advaned in order to run a Python program. Without such a token, we might get the following error message if we run a datadotworld function:

- According to the error message, we must run the following configure command:

- Now we can use the Python package as shown in the following Python program:
import datadotworld as dw name='jonloyens/an-intro-to-dataworld-dataset' results = dw.query(name, 'SELECT * FROM `DataDotWorldBBallStats`, `DataDotWorldBBallTeam` ' 'WHERE DataDotWorldBBallTeam.Name = DataDotWorldBBallStats.Name') df = results.dataframe print(df)
- The related output is shown here:
