Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def pivot_dialog(self):
default = self.nav_tree.currentItem().data(0, Qt.DisplayRole)
win = PivotDialog(store.data, default=default, gui=self)
f'Automatically converted "{df_name}" from type {type(df_object)}'
" to DataFrame"
)
except:
logger.warning(
f'Could not convert "{df_name}" from type {type(df_object)} to'
" DataFrame"
)
return
# Non-string column indices causes problems when pulling them from a GUI dropdown (which will give str)
if type(df_object.columns) != pd.MultiIndex:
df_object.columns = df_object.columns.astype(str)
store.data[df_name] = {}
store.data[df_name] = {}
store.data[df_name]["dataframe"] = df_object
dfe = DataFrameExplorer(df_object)
self.stacked_widget.addWidget(dfe)
store.data[df_name]["dataframe_explorer"] = dfe
self.add_df_to_nav(df_name)