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

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) 
主站蜘蛛池模板: 来宾市| 中牟县| 南和县| 城步| 恭城| 昂仁县| 荔波县| 延吉市| 昆山市| 牟定县| 东山县| 时尚| 潼关县| 泌阳县| 略阳县| 伊通| 宁德市| 娄底市| 兴仁县| 广平县| 濮阳市| 蕲春县| 六盘水市| 西峡县| 西林县| 玉溪市| 类乌齐县| 阳原县| 铁岭市| 新巴尔虎右旗| 镇巴县| 洛扎县| 田林县| 诏安县| 安义县| 廊坊市| 扶风县| 泰安市| 商南县| 济宁市| 瑞安市|