diff --git a/__init__.py b/__init__.py index 493a97e..1146b5d 100644 --- a/__init__.py +++ b/__init__.py @@ -9,6 +9,7 @@ from .modules.pandas_wrapper.pandas_head import PandasHead from .modules.pandas_wrapper.pandas_index import PandasIndex from .modules.pandas_wrapper.pandas_join import PandasJoin from .modules.pandas_wrapper.pandas_load_csv import PandasLoadCSV +from .modules.pandas_wrapper.pandas_load_csv_with_encoding import PandasLoadCSVWithEncoding from .modules.pandas_wrapper.pandas_load_csv_with_index import PandasLoadCSVWithIndex from .modules.pandas_wrapper.pandas_loc_cell_str import PandasLocCellStr from .modules.pandas_wrapper.pandas_loc_row_series import PandasLocRowSeries @@ -35,6 +36,7 @@ NODE_CLASS_MAPPINGS: Dict[str, Type[T]] = { "PandasIndex": PandasIndex, "PandasJoin": PandasJoin, "PandasLoadCSV": PandasLoadCSV, + "PandasLoadCSVWithEncoding": PandasLoadCSVWithEncoding, "PandasLoadCSVWithIndex": PandasLoadCSVWithIndex, "PandasLocCellStr": PandasLocCellStr, "PandasLocRowSeries": PandasLocRowSeries, @@ -59,12 +61,13 @@ NODE_DISPLAY_NAME_MAPPINGS: Dict[str, str] = { "MPLScatter": "MPL Scatter Plot", "PandasColumns": "Pandas Columns", "PandasCreate": "Pandas Create", - "PandasCreateWithIndex": "Pandas Create with Index", + "PandasCreateWithIndex": "Pandas Create With Index", "PandasHead": "Pandas Head", "PandasIndex": "Pandas Index", "PandasJoin": "Pandas Join", "PandasLoadCSV": "Pandas Load CSV", - "PandasLoadCSVWithIndex": "Pandas Load CSV with Index", + "PandasLoadCSVWithEncoding": "Pandas Load CSV With Encoding", + "PandasLoadCSVWithIndex": "Pandas Load CSV With Index", "PandasLocCellStr": "Pandas Loc Cell Str", "PandasLocRowSeries": "Pandas Loc Row Series", "PandasSaveCSV": "Pandas Save CSV", diff --git a/docs/ug.md b/docs/ug.md index 11cf079..cddebae 100644 --- a/docs/ug.md +++ b/docs/ug.md @@ -14,10 +14,11 @@ You can right-click, select **Add Node**, go to **Data Analysis**, and look for | Node Name | Functionality | |-------------------------|-------------------------------------| | **Pandas Load CSV** | Load a CSV file | -| **Pandas Load CSV with Index** | Load a CSV file containing index | +| **Pandas Load CSV With Encoding** | Load a CSV file not encoded in utf-8 | +| **Pandas Load CSV With Index** | Load a CSV file containing index | | **Pandas Save CSV** | Save a DataFrame to a CSV file | | **Pandas Create** | Create a DataFrame from CSV text field | -| **Pandas Create with Index** | Create a DataFrame from CSV text field containing index | +| **Pandas Create With Index** | Create a DataFrame from CSV text field containing index | | **Pandas Columns** | Extract column labels | | **Pandas Index** | Extract row labels (index) | | **Pandas Select Columns** | Select specific columns from a DataFrame | @@ -41,10 +42,10 @@ A faster way is to double-click the canvas to open the node search dialog. The examples directory contains workflows that load data from an example dataset included in this package. These workflows should give you a good idea about how to use these nodes. ## Loading data -Use **Pandas Load CSV** node to load a CSV, or **Pandas Load CSV with Index** node if the CSV contains an index column. +Use **Pandas Load CSV** node to load a CSV, or **Pandas Load CSV With Index** node if the CSV contains an index column. These nodes assume that the file is encoded in utf-8. If the file is not encoded in utf-8, use **Pandas Load CSV With Encoding** to specify the encoding of the file. This is necessary if the data was collected before utf-8 encoding became popular. For example, you can try "latin_1" for a file that contains accented characters in the US and Western Europe. ![Pandas Load CSV node](images/load.jpg) -This will emit the DataFrame in a JSON string. +These nodes emit the DataFrame in a JSON string. CSV file path is relative to the ComfyUI installation directory unless you specify the absolute file path. ## Saving data diff --git a/pyproject.toml b/pyproject.toml index 196a872..8cdf8ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "data-analysis" description = "Data analysis custom modules for ComfyUI - Use Pandas & Matplotlib within ComfyUI" -version = "1.0.10" +version = "1.0.11" license = {file = "LICENSE"} [project.urls]