Skip to content

Commit 1dda964

Browse files
itamarometa-codesync[bot]
authored andcommitted
Wrap pd.DataFrame index list literals with pd.Index() in core_stats+ax+data_ai
Summary: Python 3.14 pandas type stubs require explicit `pd.Index()` for the `index` parameter of `pd.DataFrame.__init__`. Wrap list literals with `pd.Index()`. Applied via: `buck run fbcode//python/upgrade/codemods:cli -- pandas-dataframe-index` Backwards compatible — `pd.Index` has been available since early pandas versions. Reviewed By: drinkmorewaterr Differential Revision: D96619276 fbshipit-source-id: 8958803314379757bfbeb5b4ac50c91358ea1161
1 parent 3659190 commit 1dda964

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ax/analysis/plotly/marginal_effects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def _prepare_data(
219219

220220
arm_dfs = []
221221
for arm in plot_data.in_sample.values():
222-
arm_df = pd.DataFrame(arm.parameters, index=[arm.name])
222+
arm_df = pd.DataFrame(arm.parameters, index=pd.Index([arm.name]))
223223
arm_df["mean"] = arm.y_hat[metric]
224224
arm_df["sem"] = arm.se_hat[metric]
225225
arm_dfs.append(arm_df)

0 commit comments

Comments
 (0)