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

Introduction to the cbsodata Python package

To install the cbsodata Python package, perform the following steps:

  1. We can use one of the following commands:
conda install cbsodata 
pip install cbsodata 

For more detailed instructions about how to install the Python package, please see Chapter 6, Managing Packages:

  1. The next program shows one example of using the package:
import pandas as pd 
import cbsodata as cb 
name='82070ENG' 
data = pd.DataFrame(cb.get_data(name)) 
print(data.head()) 
info=cb.get_info(name) 
print(info['Title']) 
  1. The corresponding output is shown in the following screenshot:

The last line in the screenshot gives the name of the dataset. In the previous example, we used the dataset with the name 82070ENG.

  1. To find out all the names of lists, we use the get_table_list() function; see the following code:
import cbsodata as cb 
list=cb.get_table_list() 
print(list) 
主站蜘蛛池模板: 洪湖市| 青河县| 怀来县| 南安市| 秀山| 阜城县| 耿马| 西乡县| 汉寿县| 黑河市| 沧州市| 丹寨县| 凌海市| 乐山市| 台安县| 左贡县| 铜陵市| 滕州市| 朝阳区| 璧山县| 枣强县| 宁阳县| 女性| 通山县| 天柱县| 庄浪县| 广平县| 连云港市| 延川县| 隆林| 正定县| 孝义市| 香格里拉县| 定兴县| 赤峰市| 永济市| 葵青区| 杭锦旗| 丰台区| 桃园市| 正宁县|