Hotfix for new pandas version
In previous pandas versions,
df = read.csv("/path/to/file.csv")
foo = pd.Dataframe(df['bar'], index=df['baz'])
would result in foo
's index being named baz
. In pandas==1.1.3 (on which
covid19uk
depends), the column name is not used as the index name, resulting
in an un-named index. Thus, the index now needs to be explicitly constructed
foo = pd.DataFrame(df['bar'], index=pd.Index(df['baz'], name='baz'))
to get a named index.
CHANGES:
- Explicit index naming in summarize.py, summary_dha.py.