Open
Description
Is your feature request related to a problem?
This might help with two things
- A coordination point for 3rd-party libraries creating objects they'd like to turn into DataFrames, and users of those libraries
- Possibly, simplification of
DataFrame.__init__
Describe the solution you'd like
A new top-level pd.dataframe
function.
def dataframe(data: Any, index: Index, columns: Index, copy: bool = False):
"""
Create a pandas DataFrame from data.
"""
@singledispatch.register(np.ndarray)
def dataframe(...):
pass
API breaking implications
None
Describe alternatives you've considered
xref #32844. Which attempted this for DataFrame.__init__
. That was a non-starter since it exposed our internal BlockManager too publicly. #32844 (comment). So we'd need to do this on a top-level function instead.