diff --git a/ddf_utils/model/package.py b/ddf_utils/model/package.py index 00de236..1755ae3 100644 --- a/ddf_utils/model/package.py +++ b/ddf_utils/model/package.py @@ -267,7 +267,7 @@ def load_ddf(self): # 2. dtype for time for c_id, c in concepts.items(): if c.concept_type == 'time': - dtypes[c_id] = 'uint64' # TODO: maybe there are other format for time. + dtypes[c_id] = 'int64' # TODO: maybe there are other format for time. # 3. group files for same indicator together indicators = dict() for field, pkey, path in self._gen_datapoints(): diff --git a/tests/chef/test_procedures.py b/tests/chef/test_procedures.py index 914ecce..6a2f8dc 100644 --- a/tests/chef/test_procedures.py +++ b/tests/chef/test_procedures.py @@ -61,7 +61,7 @@ def test_filter(): assert set(dps.keys()) == {'imr_upper', 'imr_lower'} for dp in dps.values(): - assert dp.year.dtype == np.uint64 + assert dp.year.dtype == np.int64 assert np.all(dp.year > 2000) assert set(dp.country.unique()) == {'usa', 'swe'} @@ -81,7 +81,7 @@ def test_flatten(): 'agriculture_percentage_f', 'agriculture_percentage_m', 'agriculture_thousands', 'agriculture_percentage'} - assert res[0].compute()['agriculture_percentage_m'].dtypes['year'] == np.uint64 + assert res[0].compute()['agriculture_percentage_m'].dtypes['year'] == np.int64 def test_groupby(): @@ -115,7 +115,7 @@ def test_translate_column(): chef.run() res = chef.dag.get_node('bp-datapoints-aligned').evaluate().compute() - assert res['biofuels_production_kboed'].dtypes['year'] == np.uint64 + assert res['biofuels_production_kboed'].dtypes['year'] == np.int64 def test_translate_header(): @@ -128,7 +128,7 @@ def test_translate_header(): assert set(data.keys()) == set(indicators) for i in indicators: assert set(data[i].columns) == set(['geo', 'time', i]) - assert data[i].dtypes['time'] == np.uint64 + assert data[i].dtypes['time'] == np.int64 data = res[1].get_data() assert 'city' in data.keys() @@ -155,7 +155,7 @@ def test_trend_bridge(): chef.run() res = chef.dag.get_node('res-1').evaluate().compute() - assert res['imr_lower'].dtypes['year'] == np.uint64 + assert res['imr_lower'].dtypes['year'] == np.int64 def test_window(): @@ -192,7 +192,7 @@ def test_merge(): indicators = ['imr_lower', 'imr_median', 'imr_upper', 'biofuels_production_kboed', 'biofuels_production_ktoe'] assert set(data.keys()) == set(indicators) - assert data['imr_median'].dtypes['year'] == np.uint64 + assert data['imr_median'].dtypes['year'] == np.int64 imr_lower = data['imr_lower'].set_index(['geo', 'year']) assert imr_lower.loc[('afg', 1961), 'imr_lower'] == 2055