BUG: Panel.from_dict does not set dtype when specified by mortada · Pull Request #10058 · pandas-dev/pandas (original) (raw)
currently Panel.from_dict is just ignoring the dtype argument:
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: df = pd.DataFrame(np.array(range(6)).reshape(3, 2))
In [4]: pa = pd.Panel.from_dict({'a': df, 'b': df}, dtype=float)
In [5]: pa.dtypes
Out[5]:
a int64
b int64
dtype: object
this PR sets the dtype and fixes the docstrings in some places