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

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) 
主站蜘蛛池模板: 称多县| 苍山县| 侯马市| 延寿县| 宁安市| 襄城县| 灵寿县| 赣州市| 高雄县| 天门市| 永寿县| 芮城县| 微山县| 晴隆县| 正镶白旗| 黄冈市| 井研县| 凯里市| 都江堰市| 莫力| 罗江县| 万源市| 通许县| 滨州市| 崇仁县| 鄢陵县| 黄石市| 荥经县| 舟山市| 漳州市| 安徽省| 辽阳县| 北宁市| 惠水县| 兰考县| 罗山县| 新余市| 江源县| 深圳市| 平顶山市| 元朗区|