Extensions/ComfyUI-Data-Analysis
ComfyUI Extension

ComfyUI-Data-Analysis

Data analysis custom modules for ComfyUI - Use Pandas & Matplotlib from within ComfyUI

By HowToSD·Created 2 years ago·Updated about a year ago· 23
HowToSD/ComfyUI-Data-Analysis
Nodes186
On cloudLocal install
CategoryData Analysis
Stars23
Updatedabout a year ago

Nodes (186)

CDA Float Create

The node that types a float so you don't have to

Data Analysis
CDA Int Create

Hand a typed integer to any node in the pack

Data Analysis
CDA JSON Create

The glue that turns typed JSON into pack-ready input

Data Analysis
CDA Show Float

Actually see the number instead of trusting the wire

Data Analysis
CDA Show Int

See your integer before you build anything on top of it

Data Analysis
CDA String Create

Turn a text field into a proper string node

Data Analysis
CDA Text Create

The pack's multiline text source, ready to wire

Data Analysis
MPL Bar Chart

Get a real bar chart out of a DataFrame and into your workflow

Data Analysis
MPL Line Plot

Trends from your DataFrame, rendered as a real image

Data Analysis
MPL Pie Chart

Proportions at a glance, straight from a DataFrame

Data Analysis
MPL Scatter Plot

See the relationship between two columns at a glance

Data Analysis
Numpy Float Create

Type a list, get a float32 array

Data Analysis
Numpy Int Create

Build an int32 array by typing a list

Data Analysis
Numpy Show

See what's actually in that array before it breaks your workflow

Data Analysis
Numpy Squeeze

Strip the useless size-1 dimensions out of your array

Data Analysis
Pandas Add

Add two DataFrames cell by cell — alignment included, no matrix math

Data Analysis
Pandas Add Scalar Float

Shift every value in a DataFrame by one constant

Data Analysis
Pandas Add Scalar Int

Add one integer to every cell — the non-float cousin

Data Analysis
Pandas Add Series

Shift each column by its own amount, using a Series

Data Analysis
Pandas As Float

Force every cell to a number — junk becomes NaN, nothing explodes

Data Analysis
Pandas As Int

Make the whole frame integer — with NaN still allowed to exist

Data Analysis
Pandas As String

Flatten the whole table to text in one pass

Data Analysis
Pandas At Datetime

Pluck one datetime out of a table by its row and column labels

Data Analysis
Pandas At Float

Grab a single number out of a table and wire it anywhere

Data Analysis
Pandas At Int

Pull one integer out of a DataFrame by label

Data Analysis
Pandas At Set Datetime

Write a datetime into a specific cell — and know it mutates

Data Analysis
Pandas At Set Float

Patch one cell with a number, in place

Data Analysis
Pandas At Set Int

Write one integer into a cell and hand the frame back

Data Analysis
Pandas At Set String

Drop a string into a single cell, in place

Data Analysis
Pandas At String

The node that turns one table cell into prompt text

Data Analysis
Pandas Boolean Index

Filter a table down to the rows that matter, with a True/False Series

Data Analysis
Pandas Columns

Stop guessing what your columns are called

Data Analysis
Pandas Corr

The whole correlation matrix, in three flavors

Data Analysis
Pandas Cos

Element-wise cosine — for when your data is actually an angle

Data Analysis
Pandas Count

Non-null counts per column, in one Series — the data-quality check

Data Analysis
Pandas Cov

Covariance, not correlation — the matrix that keeps the scale

Data Analysis
Pandas Create

The fastest on-ramp to pandas in ComfyUI

Data Analysis
Pandas Create From Dict

Build a DataFrame from a Python dict, the way ComfyUI can actually wire it

Data Analysis
Pandas Create From Dict Index List

When your row labels actually mean something

Data Analysis
Pandas Create From Multiple Dict

Up to ten columns, one dict per column

Data Analysis
Pandas Create From Numpy

Hand your arrays to pandas without the round-trip

Data Analysis
Pandas Create From Tensor

Turn a PyTorch tensor into a table you can analyze

Data Analysis
Pandas Create Series From Dict

One-dimensional data, dict-shaped

Data Analysis
Pandas Create Series From List

The simplest way to get a Series onto your canvas

Data Analysis
Pandas Create Series From List Index List

A Series with labels you actually chose

Data Analysis
Pandas Create With Index

When your CSV's first column is an index, not data

Data Analysis
Pandas Crosstab

Count how often two categories line up, in one node

Data Analysis
Pandas Cummax

Track the running maximum down a column

Data Analysis
Pandas Cummin

The running minimum, for when only the worst-so-far matters

Data Analysis
Pandas Cumprod

Running products, with a warning about compound explosions

Data Analysis
Pandas Cumsum

The running total, the workhorse of the cumulative family

Data Analysis
Pandas Div

Divide one DataFrame by another, alignment and all

Data Analysis
Pandas Div Scalar Float

Scale a whole table by one number

Data Analysis
Pandas Div Scalar Int

Integer-scaled division when you know the number is whole

Data Analysis
Pandas Div Series

Divide every column by one Series, the normalization move

Data Analysis
Pandas Drop Duplicates

Sweep the repeat rows out of your table

Data Analysis
Pandas Drop NA

Delete the rows with missing values before they corrupt your math

Data Analysis
Pandas Eq

The == operator of your data graph

Data Analysis
Pandas Eq Scalar Float

Flag every cell that equals exactly this number

Data Analysis
Pandas Eq Scalar Int

The node for matching integer codes

Data Analysis
Pandas Excel File Sheet Names

Find out what's actually inside that .xlsx

Data Analysis
Pandas Exp

E^x across your whole table, with strings safely out of the way

Data Analysis
Pandas Feature Split To Numpy

The ML-prep node that collapses four nodes into one

Data Analysis
Pandas Feature Split To Pt

Ship your table straight to PyTorch tensors

Data Analysis
Pandas Fill NA Scalar Float

Patch missing values before they poison your math

Data Analysis
Pandas Fill NA Scalar Int

Fill the gaps with a whole number, not a guess

Data Analysis
Pandas Ge

Element-wise 'greater than or equal to' between two frames

Data Analysis
Pandas Ge Scalar Float

The threshold filter you'll actually use daily

Data Analysis
Pandas Ge Scalar Int

Integer thresholds for when decimals don't matter

Data Analysis
Pandas Group By

The 'group by year, sum the hits' node the whole pack is built around

Data Analysis
Pandas Gt

The strict 'greater than' comparison, cell by cell

Data Analysis
Pandas Gt Scalar Float

Strict 'greater than' against a threshold

Data Analysis
Pandas Gt Scalar Int

Strict integer thresholds for counts and ranks

Data Analysis
Pandas Head

A quick peek at your first rows, ComfyUI-style

Data Analysis
Pandas Horizontal Concat

Glue two tables side by side

Data Analysis
Pandas Horizontal Split

Cut a wide table into two narrower ones

Data Analysis
Pandas Iat Datetime

Pull one datetime cell out of your table

Data Analysis
Pandas Iat Float

Extract one number from your table to drive a node

Data Analysis
Pandas Iat Int

The node that turns a table cell into a number you can actually use

Data Analysis
Pandas Iat Set Datetime

Poke a datetime into any cell of a DataFrame

Data Analysis
Pandas Iat Set Float

Write a float into one cell without touching the rest

Data Analysis
Pandas Iat Set Int

Correct a single integer cell, position by position

Data Analysis
Pandas Iat Set String

Overwrite one text cell, the un-pandas way

Data Analysis
Pandas Iat String

Grab one cell out of a DataFrame as text

Data Analysis
Pandas Iloc Rows DataFrame

Select rows by a list of positions, not a range

Data Analysis
Pandas Iloc Row Series

Pull one row out as a Series, by its position

Data Analysis
Pandas Iloc Rows Slice DataFrame

Slice a run of rows out of a DataFrame

Data Analysis
Pandas Index

Get a DataFrame's row labels out where you can see them

Data Analysis
Pandas Index To String

Turn a DataFrame's index into text you can actually read

Data Analysis
Pandas Is NA

Map every missing value in your data before it bites you

Data Analysis
Pandas Join

Merge two DataFrames on a shared column, visually

Data Analysis
Pandas Kurtosis

How peaky is your data? Ask kurtosis.

Data Analysis
Pandas Le

Element-by-element 'less than or equal to' between two tables

Data Analysis
Pandas Le Scalar Float

Flag every cell that's at or below a float threshold

Data Analysis
Pandas Le Scalar Int

Flag every cell at or below an integer cutoff

Data Analysis
Pandas Load CSV

Load a CSV into a DataFrame — the node most of this pack starts from

Data Analysis
Pandas Load CSV With Encoding

The CSV loader for files that aren't UTF-8

Data Analysis
Pandas Load CSV With Index

Load a CSV that already has an index column

Data Analysis
Pandas Load Excel

Read an Excel sheet into a DataFrame, no export step needed

Data Analysis
Pandas Load HTML

Scrape the tables out of an HTML page, up to ten at a time

Data Analysis
Pandas Load JSON

The on-ramp for tabular data in ComfyUI

Data Analysis
Pandas Loc Cell String

Pull one cell out of a DataFrame as text

Data Analysis
Pandas Loc Row MultiIndex DataFrame

Picking rows when your index has two keys

Data Analysis
Pandas Loc Row Series

One whole row, by label, as a Series

Data Analysis
Pandas Log

Natural logs on a DataFrame, with the mess cleaned up

Data Analysis
Pandas Lt

Element-wise 'less than' between two DataFrames

Data Analysis
Pandas Lt Scalar Float

'every value under this number?' in one node

Data Analysis
Pandas Lt Scalar Int

The quick 'values below this threshold' mask

Data Analysis
Pandas Max

The per-column ceiling of your table

Data Analysis
Pandas Mean

The average of every column, in one Series

Data Analysis
Pandas Median

The average that survives your outliers

Data Analysis
Pandas Melt

The reshape that turns wide data into long data

Data Analysis
Pandas Min

The floor of every column, fast

Data Analysis
Pandas Mode

The most common value in every column — all of them

Data Analysis
Pandas Mul

Multiply two DataFrames, cell by cell

Data Analysis
Pandas Mul Scalar Float

Scale an entire DataFrame by one number

Data Analysis
Pandas Mul Scalar Int

Multiply a whole DataFrame by one integer

Data Analysis
Pandas Mul Series

Multiply a DataFrame by one row's worth of values

Data Analysis
Pandas Ne

Find where two DataFrames disagree, cell by cell

Data Analysis
Pandas Ne Scalar Float

Flag every cell that isn't this number

Data Analysis
Pandas Ne Scalar Int

Pandas Ne Scalar Int

Data Analysis
Pandas Pivot

Pandas Pivot

Data Analysis
Pandas Pow

Pandas Pow

Data Analysis
Pandas Pow Scalar Float

Pandas Pow Scalar Float

Data Analysis
Pandas Pow Scalar Int

Pandas Pow Scalar Int

Data Analysis
Pandas Pow Series

Pandas Pow Series

Data Analysis
Pandas Rename

Pandas Rename

Data Analysis
Pandas Rename Advanced

Pandas Rename Advanced

Data Analysis
Pandas Replace

Pandas Replace

Data Analysis
Pandas Replace Advanced

Pandas Replace Advanced

Data Analysis
Pandas Save CSV

Pandas Save CSV

Data Analysis
Pandas Save JSON

Pandas Save JSON

Data Analysis
Pandas Select Column As Series

Pandas Select Column As Series

Data Analysis
Pandas Select Columns

Pandas Select Columns

Data Analysis
Pandas Select Rows

Pandas Select Rows

Data Analysis
Pandas Series To DataFrame

Pandas Series To DataFrame

Data Analysis
Pandas Series To String

Pandas Series To String

Data Analysis
Pandas Set Index

Pandas Set Index

Data Analysis
Pandas Show DataFrame

Pandas Show DataFrame

Data Analysis
Pandas Show Index

Pandas Show Index

Data Analysis
Pandas Show Series

See what's actually inside your Pandas Series

Data Analysis
Pandas Show Text

The 'just let me see it' text viewer every workflow ends with

Data Analysis
Pandas Sin

Apply sine to a whole DataFrame, non-numeric cells become NaN

Data Analysis
Pandas Skew

Is your data lopsided? One node for skewness

Data Analysis
Pandas Sort

Sort a DataFrame by a column, ascending or not

Data Analysis
Pandas Std

Standard deviation per column, in one node

Data Analysis
Pandas Strftime

Turn datetime columns into pretty strings

Data Analysis
Pandas Sub

Subtract one DataFrame from another, cell by cell

Data Analysis
Pandas Sub Scalar Float

Subtract one float from an entire DataFrame

Data Analysis
Pandas Sub Scalar Int

Subtract a whole number from every row

Data Analysis
Pandas Sub Series

Subtract a Series from every row of a DataFrame

Data Analysis
Pandas Sum

Column totals, as a Series — the SQL SUM of the graph

Data Analysis
Pandas Summary

The first node you should run on any new dataset

Data Analysis
Pandas Tan

Apply tangent to a DataFrame — the math node that turns garbage to NaN

Data Analysis
Pandas To Datetime

Turn messy date strings into real datetime columns

Data Analysis
Pandas To Numpy

The bridge from DataFrame to numpy arrays

Data Analysis
Pandas To String

A whole DataFrame, as one big text blob

Data Analysis
Pandas Transpose

Rows become columns, columns become rows

Data Analysis
Pandas Value Counts

How often does each value show up?

Data Analysis
Pandas Var

Per-column variance, because std alone doesn't tell the story

Data Analysis
Pandas Vertical Concat

Stack Two DataFrames Into One Without Touching a Terminal

Data Analysis
Pandas Vertical Split

Cut a DataFrame in Half — Your Train/Test Split, in Two Nodes

Data Analysis
Pandas Xs

Selecting Rows From a MultiIndex DataFrame, Sans Panic

Data Analysis
Py Datetime To String

A Date to a Filename-Ready String, Formatted Your Way

Data Analysis
Py Float To String

Turn a Number Into Text — Because Some Nodes Only Speak Strings

Data Analysis
Py Int To String

An Integer That Needs to Be Text? One Node, No Rounding Drama

Data Analysis
Py Kv Float Create

Build a One-Key Dict From a Widget — Feed It Straight Into Pandas

Data Analysis
Py Kv Int Create

A Key Plus an Integer Becomes a Dict — That's the Whole Trick

Data Analysis
Py Kv String Create

Stuff a Text Value Into a Dict — Multiline Welcome

Data Analysis
Py List To String

See What's Actually in That List — and Render It as Text

Data Analysis
Py String To Datetime

30:00' Into a Real Datetime Object

Data Analysis
Py String To Dict

Type a Python Dict Literal, Get a Real Dict, Feed Pandas

Data Analysis
Py String To Float

Parse a Number Out of a Text Field — With All the Float Quirks

Data Analysis
Py String To Int

Pull an Integer Out of Text — No Float Traps, Just Strictness

Data Analysis
Py String To List

Type a Python List Literal, Get a Real List — Round Trip Included

Data Analysis
SNS Bar Chart

Bar Charts Straight Out of Your DataFrame — This Is the Workhorse

Data Analysis
SNS Bar Chart Pt

Bar Chart a Tensor Directly — Skip the DataFrame Altogether

Data Analysis
SNS Boxplot

Distributions by Category, in One Node — Median, Quartiles, Outliers

Data Analysis
SNS Heatmap

This Heatmap Is Really a Correlation Matrix

Data Analysis
SNS Histogram

One Column, One Histogram — Pixel Distributions and Everything Else

Data Analysis
SNS Histogram Pt

Histogram a tensor directly — no DataFrame detour

Data Analysis
SNS Line Plot

Line charts in ComfyUI — no Python, no leaving the graph

Data Analysis
SNS Line Plot Pt

Line plots straight from a tensor, when you're already in tensor land

Data Analysis
SNS Pairplot

See every column against every other column at once

Data Analysis
SNS Scatter Plot

Spot a correlation without leaving ComfyUI

Data Analysis
SNS Scatter Plot Pt

Scatter a tensor, skip the DataFrame

Data Analysis
Readme

ComfyUI-Data-Analysis

Update (March 10, 2025)

All PyTorch nodes have been moved to a separate extension. If you're using PyTorch wrappers, install the ComfyUI-Pt-Wrapper extension.

Baseball tutorial

How Can We Figure Out Which MLB Player Had the Most Hits Per Year?

If you love ComfyUI, it's likely because of its incredible flexibility—allowing you to customize workflows to achieve exactly the results you want, primarily in image generation.

ComfyUI was designed to make Stable Diffusion accessible to non-engineers while offering extensive customization. However, it doesn’t natively support structured data like baseball statistics. That’s why I created this ComfyUI extension—to bridge that gap.

At the end of this page, you’ll find a tutorial on how to use this package to answer the MLB hits question.

I hope you find it useful and engaging for data exploration.

— Hide Inada

<hr>

Baseball tutorial ComfyUI-Data-Analysis is an extension for ComfyUI that provides custom nodes for data analysis using Pandas, Seaborn, and Matplotlib within ComfyUI. Especially, this is suited if you want to analyze structural data (tabular data) using ComfyUI's node system.

Features

ComfyUI-Data-Analysis includes numerous custom nodes that wrap Pandas, Matplotlib and Seaborn. For a complete list, see the Node Reference.

These nodes allow you to conduct complex analyses in an intuitive, graphical way. You can also combine them with other ComfyUI custom nodes to fit your workflow needs (e.g., integrating images).

Visualization & Analysis

These custom nodes enhance efficiency and usability in data exploration and visualization. Creating sample data and plotting it is incredibly simple:

SNS Line Plot
Example plot

Additionally, you can analyze images generated in ComfyUI’s workflows. Below is an example of a histogram showing the red channel pixel distribution (Note that you will also need a companion extension ComfyUI-Pt-Wrapper extension to access PyTorch tensors as shown in below screenshot):

Red channel pixel distribution

Installation

Note: GPU is not required to run this custom module.

Installation via ComfyUI Manager

  1. Press Manager button on the top menu bar to display ComfyUI Manager Menu.
  2. Click Custom Node Manager.
  3. In the search field, enter Data analysis.
  4. "ComfyUI-Data-Analysis" should be displayed. Select Install.
  5. Restart ComfyUI.
  6. Reload browser page.

Installation via git

  1. Navigate to the custom_nodes directory within your ComfyUI installation.

  2. Run the following command:

    git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
    

    This will create a new subdirectory ComfyUI-Data-Analysis.

  3. Rename the folder name from ComfyUI-Data-Analysis to data-analysis. Skipping this step will cause example workflows to fail, as they rely on this folder name.

  4. Check if your ComfyUI environment already has required packages listed in requirements.txt. If not, install them using pip.

    pip install -r requirements.txt
    

    Refer to requirements.txt for the right versions.

  5. Start ComfyUI.

Troubleshooting for installation

This custom node module requires pandas and matplotlib, which are not included in the default ComfyUI installation. If you install this module using ComfyUI Manager, these packages should be installed automatically. However, if installation fails, refer to the pandas and matplotlib documentation for manual installation.

How to Use

Refer to User's Guide or check out Node Reference

For a practical example, see the tutorial on baseball data: How to Find Out Who Had the Most Hits.

Update

Refer to the release notes. While backward-incompatible changes are minimized, some may be necessary. The release notes contain those changes so that you know what to expect before upgrading your version.

Contribution

🚫 This project does not accept pull requests.
Unsolicited PRs will be closed without review.

If you have a feature request or improvement suggestion, please create an Issue instead.
All submitted issues will be reviewed and prioritized accordingly.

Note

The cover baseball image was generated using FLUX.1-dev. Commercial use of this image is not permitted.