官术网_书友最值得收藏!

Introduction to the datadotworld Python package

To install the datadotworld Python package, follow these steps:

  1. First, we have to install the package. To do so, we could try one of the following lines:
conda install datadotworld 
pip install datadotworld 
  1. After the package is successfully installed, we can use the dir() function to list all its functions, as shown in this screenshot:
  1. 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:
  1. According to the error message, we must run the following configure command:
  1. 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) 
  1. The related output is shown here:
主站蜘蛛池模板: 巍山| 保定市| 东源县| 托里县| 乌鲁木齐县| 绍兴县| 万全县| 甘泉县| 措勤县| 双峰县| 启东市| 冀州市| 惠州市| 西昌市| 古丈县| 武乡县| 富宁县| 苏尼特右旗| 龙陵县| 肃宁县| 乐陵市| 油尖旺区| 乳山市| 康保县| 兴化市| 安吉县| 冕宁县| 永善县| 瓦房店市| 五指山市| 东源县| 临澧县| 祥云县| 叶城县| 扎兰屯市| 万全县| 中西区| 类乌齐县| 盐津县| 苍南县| 临漳县|