Icon

kn_​example_​python_​excel_​import_​knime

KNIME - use Pandas and OpenPyxl to import a protected and formatted excel sheet - where import is otherwise slow

KNIME - use Pandas and OpenPyxl to import a protected and formatted excel sheet - where import is otherwise slow

KNIME - use Pandas and OpenPyxl to import a protected and formatted excel sheet - where import is otherwise slowhttps://forum.knime.com/t/knime-4-5-2-excel-reader-extremely-slow-when-reading-from-other-sheet-different-than-the-first/41008/15?u=mlauber71 ############################################### import the KNIME moduleimport knime_io as knioimport numpy as npimport pandas as pdvpy_excel_file = knio.flow_variables['var_excel_file_import']vpy_sheet_name = knio.flow_variables['v_excel_sheet']vpy_rows_to_skip = knio.flow_variables['v_rows_to_skip']vpy_rows_to_load = knio.flow_variables['v_rows_to_load']# vpy_cols_to_use = knio.flow_variables['v_cols_to_use']# , nrows=Nonedf = pd.read_excel(vpy_excel_file, sheet_name=vpy_sheet_name, header=1, skiprows=vpy_rows_to_skip, nrows=vpy_rows_to_load) knio.output_tables[0] = knio.write_table(df) Propagate Python environmentfor KNIME on MacOSX withMinicondaconfigure how to handle the environmentdefault = just check the namesdeterminepath and name of workflowDate&Time1Date&Time2duration secondsv_excel_fileHoja Trabajo MPS official - ALEJANDRA SOLIS CASTROv_excel_sheetSTATUS INVENTARIOvar_excel_file_importSTATUS INVENTARIOSTATUS INVENTARIOPropagate Python environmentfor KNIME on Windows withMinicondaconfigure how to handle the environmentdefault = just check the namesSTATUS INVENTARIOv_rows_to_skipv_rows_to_loaddefault 1.000MODULARMODULARv_rows_to_skipv_excel_sheet MODULARv_rows_to_loaddefault 1.000MODULAR"Dia" Missing -> exclude"Dia" Missing -> excludevar_table_file_exportvar_table_file_exportSTATUS INVENTARIOvar_table_file_exportvar_table_file_exportMODULARflow_variables['var_py_version_pandas'] = pd.__version__flow_variables['var_py_version_numpy'] = np.__version__flow_variables['var_py_version'] = sys.version_infoflow_variables['var_sys_path'] = sys.pathduration secondsDate&Time1Date&Time2conda_environment_kaggle_macosx Extract ContextProperties Create Date&TimeRange Create Date&TimeRange Date&TimeDifference determine paths StringConfiguration StringConfiguration Java EditVariable (simple) Merge Variables Python Script(Labs) conda_environment_kaggle_windows Merge Variables IntegerConfiguration IntegerConfiguration Merge Variables Merge Variables IntegerConfiguration StringConfiguration IntegerConfiguration Python Script(Labs) Row Filter Row Filter Java EditVariable (simple) String to Path(Variable) Table Writer Java EditVariable (simple) String to Path(Variable) Table Writer Python EditVariable Joiner Date&TimeDifference Create Date&TimeRange Create Date&TimeRange Joiner KNIME - use Pandas and OpenPyxl to import a protected and formatted excel sheet - where import is otherwise slowhttps://forum.knime.com/t/knime-4-5-2-excel-reader-extremely-slow-when-reading-from-other-sheet-different-than-the-first/41008/15?u=mlauber71 ############################################### import the KNIME moduleimport knime_io as knioimport numpy as npimport pandas as pdvpy_excel_file = knio.flow_variables['var_excel_file_import']vpy_sheet_name = knio.flow_variables['v_excel_sheet']vpy_rows_to_skip = knio.flow_variables['v_rows_to_skip']vpy_rows_to_load = knio.flow_variables['v_rows_to_load']# vpy_cols_to_use = knio.flow_variables['v_cols_to_use']# , nrows=Nonedf = pd.read_excel(vpy_excel_file, sheet_name=vpy_sheet_name, header=1, skiprows=vpy_rows_to_skip, nrows=vpy_rows_to_load) knio.output_tables[0] = knio.write_table(df) Propagate Python environmentfor KNIME on MacOSX withMinicondaconfigure how to handle the environmentdefault = just check the namesdeterminepath and name of workflowDate&Time1Date&Time2duration secondsv_excel_fileHoja Trabajo MPS official - ALEJANDRA SOLIS CASTROv_excel_sheetSTATUS INVENTARIOvar_excel_file_importSTATUS INVENTARIOSTATUS INVENTARIOPropagate Python environmentfor KNIME on Windows withMinicondaconfigure how to handle the environmentdefault = just check the namesSTATUS INVENTARIOv_rows_to_skipv_rows_to_loaddefault 1.000MODULARMODULARv_rows_to_skipv_excel_sheet MODULARv_rows_to_loaddefault 1.000MODULAR"Dia" Missing -> exclude"Dia" Missing -> excludevar_table_file_exportvar_table_file_exportSTATUS INVENTARIOvar_table_file_exportvar_table_file_exportMODULARflow_variables['var_py_version_pandas'] = pd.__version__flow_variables['var_py_version_numpy'] = np.__version__flow_variables['var_py_version'] = sys.version_infoflow_variables['var_sys_path'] = sys.pathduration secondsDate&Time1Date&Time2conda_environment_kaggle_macosx Extract ContextProperties Create Date&TimeRange Create Date&TimeRange Date&TimeDifference determine paths StringConfiguration StringConfiguration Java EditVariable (simple) Merge Variables Python Script(Labs) conda_environment_kaggle_windows Merge Variables IntegerConfiguration IntegerConfiguration Merge Variables Merge Variables IntegerConfiguration StringConfiguration IntegerConfiguration Python Script(Labs) Row Filter Row Filter Java EditVariable (simple) String to Path(Variable) Table Writer Java EditVariable (simple) String to Path(Variable) Table Writer Python EditVariable Joiner Date&TimeDifference Create Date&TimeRange Create Date&TimeRange Joiner

Nodes

Extensions

Links