diff --git a/pandas/core/frame.py b/pandas/core/frame.py index ea91046f4b8e4..104557dd337fd 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -705,6 +705,7 @@ def __init__( if isinstance(data, DataFrame): data = data._mgr allow_mgr = True + dtype = None if not copy: # if not copying data, ensure to still return a shallow copy # to avoid the result sharing the same Manager diff --git a/pandas/core/series.py b/pandas/core/series.py index a197886748bce..7f59989701656 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -445,6 +445,7 @@ def __init__( "compound dtype. Use DataFrame instead." ) elif isinstance(data, Series): + dtype = None if index is None: index = data.index data = data._mgr.copy(deep=False)