Enable compatability with pandas 2.0

Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
This commit is contained in:
Keith Battocchi 2023-05-03 12:42:15 -04:00 коммит произвёл Keith Battocchi
Родитель bc289f1e0d
Коммит d456085953
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -135,7 +135,7 @@ def simulate_residuals(ind):
def simulate_residuals_all(res_df):
res_df_new = res_df.copy(deep=True)
res_df_new = res_df.astype(dtype='float64', copy=True, errors='raise')
for i in range(res_df.shape[1]):
res_df_new.iloc[:, i] = simulate_residuals(i)
# demean the new residual again

Просмотреть файл

@ -598,7 +598,7 @@
"X = Xy.drop(columns = 'SalePrice')\n",
"X_ohe = (\n",
" X\n",
" .pipe(pd.get_dummies, prefix_sep = '_OHE_', columns = categorical)\n",
" .pipe(pd.get_dummies, prefix_sep = '_OHE_', columns = categorical, dtype='uint8')\n",
")\n",
"y = Xy['SalePrice']"
]

Просмотреть файл

@ -432,7 +432,7 @@
"outputs": [],
"source": [
"categorical = []\n",
"for col, value in attritionXData.iteritems():\n",
"for col, value in attritionXData.items():\n",
" if value.dtype == \"object\":\n",
" categorical.append(col)\n",
"\n",