Commit 61f57c12 authored by Christophe Benz's avatar Christophe Benz
Browse files

Rename `period` to `original_period`, and `period_start_day` to `period`

parent 92ae348e
## 0.3.0 -> 0.4.0
Breaking changes in column names:
- Rename `period` to `original_period`, and `period_start_day` to `period`.
## 0.2.1 -> 0.3.0
Breaking changes in Python API:
......
......@@ -36,7 +36,6 @@ import json
import urllib.parse
import pandas as pd
from toolz import assoc
from .internals import fetch_series_json_page
......@@ -186,10 +185,11 @@ def fetch_series_by_api_link(api_link, max_nb_series=None):
if max_nb_series is None and num_found > default_max_nb_series:
raise TooManySeries(num_found, max_nb_series)
series_list.extend(
assoc(series_json, "period_start_day", list(map(pd.to_datetime, series_json["period_start_day"])))
for series_json in series_json_page['data']
)
for series_json in series_json_page['data']:
series_json["original_period"] = series_json["period"]
series_json["period"] = list(map(pd.to_datetime, series_json["period_start_day"]))
del series_json["period_start_day"]
series_list.append(series_json)
nb_series = len(series_list)
# Stop if we have enough series.
......
This diff is collapsed.
--editable .
altair
toolz
vega
\ No newline at end of file
......@@ -35,7 +35,7 @@ with codecs.open(path.join(HERE, 'README.md'), encoding='utf-8') as f:
setup(
name='DBnomics',
version='0.3.0',
version='0.4.0',
description='DBnomics Web API Client',
long_description=LONG_DESCRIPTION,
......@@ -77,7 +77,6 @@ setup(
install_requires=[
'requests >= 2.18.4',
'pandas >= 0.21',
'toolz',
'semver',
],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment