L1 · Pyodide

Reproducing pandas-dev/pandas#56679

Loading Pyodide runtime…

Reproduction script

import sys

import pandas as pd

series_dtype = str(pd.Series([]).dtype)
df_dtype = str(pd.DataFrame({"a": []})["a"].dtype)
mismatch = series_dtype != df_dtype

result = {
    "pandas_version": pd.__version__,
    "python_version": sys.version.split()[0],
    "series_dtype": series_dtype,
    "df_dtype": df_dtype,
    "mismatch": mismatch,
}

print("Two empty containers built from the same empty input:")
print()
print("pd.Series([]).dtype".ljust(36) + "-> " + series_dtype)
print('pd.DataFrame({"a": []})["a"].dtype'.ljust(36) + "-> " + df_dtype)
print()
if mismatch:
    print("The two disagree: the same empty input yields different dtypes.")
else:
    print("The two agree: both empty containers report the same dtype.")
print("pandas " + result["pandas_version"] + " / Python " + result["python_version"])

Baseline output

Initialising…
(pending)

Fix-candidate output

(no fix candidate yet — pandas-dev/pandas#56679 is still open upstream)