示例#1
0
    def test_get_dim_index_with_label(self):
        """ Test pyjstat get_dim_index() using label as parameter """

        dim = self.oecd_datasets['oecd']['dimension']['id'][0]
        dims_df = pyjstat.get_dim_index(self.oecd_datasets['oecd'], dim)
        self.assertTrue(dims_df.iloc[0]['id'] == 'UNR')
        self.assertTrue(dims_df.iloc[-1]['index'] == 0)
示例#2
0
    def test_get_dim_index_with_label(self):
        """ Test pyjstat get_dim_index() using label as parameter """

        dim = self.oecd_datasets['oecd']['dimension']['id'][0]
        dims_df = pyjstat.get_dim_index(self.oecd_datasets['oecd'], dim)
        self.assertTrue(dims_df.iloc[0]['id'] == 'UNR')
        self.assertTrue(dims_df.iloc[-1]['index'] == 0)
示例#3
0
文件: test.py 项目: jmvg/pyjstat
    def test_get_dim_index_with_label(self):
        """ Test pyjstat get_dim_index() using label as parameter """

        dim = self.oecd_datasets["oecd"]["dimension"]["id"][0]
        dims_df = pyjstat.get_dim_index(self.oecd_datasets["oecd"], dim)
        self.assertTrue(dims_df.iloc[0]["id"] == "UNR")
        self.assertTrue(dims_df.iloc[-1]["index"] == 0)
示例#4
0
文件: test.py 项目: masego24/pyjstat
 def test_get_dim_index_with_index(self):
     """Test pyjstat get_dim_index() using id as parameter."""
     dim = self.oecd_datasets['oecd']['dimension']['id'][2]
     dims_df = pyjstat.get_dim_index(self.oecd_datasets['oecd'], dim)
     self.assertTrue(dims_df.iloc[0]['id'] == '2003')
     self.assertTrue(dims_df.iloc[-1]['index'] == 11)