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

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:
主站蜘蛛池模板: 交口县| 醴陵市| 邛崃市| 绥德县| 富宁县| 都昌县| 青州市| 吉林市| 文化| 湟中县| 广宁县| 谷城县| 永春县| 昔阳县| 贵定县| 巴彦淖尔市| 乌兰察布市| 扎兰屯市| 玛沁县| 松阳县| 贡觉县| 湘乡市| 郧西县| 清苑县| 仙桃市| 洪雅县| 金塔县| 南汇区| 巴东县| 三穗县| 建水县| 天水市| 万荣县| 桦甸市| 巴彦县| 丹阳市| 昆山市| 台南县| 湟中县| 白朗县| 马山县|