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

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:
主站蜘蛛池模板: 甘孜| 沂水县| 兴和县| 石台县| 静宁县| 郧西县| 洛隆县| 安陆市| 孟村| 浦江县| 大邑县| 长治市| 郑州市| 浏阳市| 乌兰察布市| 子长县| 库车县| 临潭县| 崇明县| 三门峡市| 甘泉县| 富民县| 上林县| 奉新县| 霞浦县| 铁岭市| 灵寿县| 民和| 临夏市| 阜平县| 定边县| 台江县| 南昌市| 镇沅| 鄢陵县| 泊头市| 施秉县| 阿克| 耒阳市| 库车县| 清水河县|