ComfyUI-Data-Analysis
Data analysis custom modules for ComfyUI - Use Pandas & Matplotlib from within ComfyUI
Nodes (186)
The node that types a float so you don't have to
Hand a typed integer to any node in the pack
The glue that turns typed JSON into pack-ready input
Actually see the number instead of trusting the wire
See your integer before you build anything on top of it
Turn a text field into a proper string node
The pack's multiline text source, ready to wire
Get a real bar chart out of a DataFrame and into your workflow
Trends from your DataFrame, rendered as a real image
Proportions at a glance, straight from a DataFrame
See the relationship between two columns at a glance
Type a list, get a float32 array
Build an int32 array by typing a list
See what's actually in that array before it breaks your workflow
Strip the useless size-1 dimensions out of your array
Add two DataFrames cell by cell — alignment included, no matrix math
Shift every value in a DataFrame by one constant
Add one integer to every cell — the non-float cousin
Shift each column by its own amount, using a Series
Force every cell to a number — junk becomes NaN, nothing explodes
Make the whole frame integer — with NaN still allowed to exist
Flatten the whole table to text in one pass
Pluck one datetime out of a table by its row and column labels
Grab a single number out of a table and wire it anywhere
Pull one integer out of a DataFrame by label
Write a datetime into a specific cell — and know it mutates
Patch one cell with a number, in place
Write one integer into a cell and hand the frame back
Drop a string into a single cell, in place
The node that turns one table cell into prompt text
Filter a table down to the rows that matter, with a True/False Series
Stop guessing what your columns are called
The whole correlation matrix, in three flavors
Element-wise cosine — for when your data is actually an angle
Non-null counts per column, in one Series — the data-quality check
Covariance, not correlation — the matrix that keeps the scale
The fastest on-ramp to pandas in ComfyUI
Build a DataFrame from a Python dict, the way ComfyUI can actually wire it
When your row labels actually mean something
Up to ten columns, one dict per column
Hand your arrays to pandas without the round-trip
Turn a PyTorch tensor into a table you can analyze
One-dimensional data, dict-shaped
The simplest way to get a Series onto your canvas
A Series with labels you actually chose
When your CSV's first column is an index, not data
Count how often two categories line up, in one node
Track the running maximum down a column
The running minimum, for when only the worst-so-far matters
Running products, with a warning about compound explosions
The running total, the workhorse of the cumulative family
Divide one DataFrame by another, alignment and all
Scale a whole table by one number
Integer-scaled division when you know the number is whole
Divide every column by one Series, the normalization move
Sweep the repeat rows out of your table
Delete the rows with missing values before they corrupt your math
The == operator of your data graph
Flag every cell that equals exactly this number
The node for matching integer codes
Find out what's actually inside that .xlsx
E^x across your whole table, with strings safely out of the way
The ML-prep node that collapses four nodes into one
Ship your table straight to PyTorch tensors
Patch missing values before they poison your math
Fill the gaps with a whole number, not a guess
Element-wise 'greater than or equal to' between two frames
The threshold filter you'll actually use daily
Integer thresholds for when decimals don't matter
The 'group by year, sum the hits' node the whole pack is built around
The strict 'greater than' comparison, cell by cell
Strict 'greater than' against a threshold
Strict integer thresholds for counts and ranks
A quick peek at your first rows, ComfyUI-style
Glue two tables side by side
Cut a wide table into two narrower ones
Pull one datetime cell out of your table
Extract one number from your table to drive a node
The node that turns a table cell into a number you can actually use
Poke a datetime into any cell of a DataFrame
Write a float into one cell without touching the rest
Correct a single integer cell, position by position
Overwrite one text cell, the un-pandas way
Grab one cell out of a DataFrame as text
Select rows by a list of positions, not a range
Pull one row out as a Series, by its position
Slice a run of rows out of a DataFrame
Get a DataFrame's row labels out where you can see them
Turn a DataFrame's index into text you can actually read
Map every missing value in your data before it bites you
Merge two DataFrames on a shared column, visually
How peaky is your data? Ask kurtosis.
Element-by-element 'less than or equal to' between two tables
Flag every cell that's at or below a float threshold
Flag every cell at or below an integer cutoff
Load a CSV into a DataFrame — the node most of this pack starts from
The CSV loader for files that aren't UTF-8
Load a CSV that already has an index column
Read an Excel sheet into a DataFrame, no export step needed
Scrape the tables out of an HTML page, up to ten at a time
The on-ramp for tabular data in ComfyUI
Pull one cell out of a DataFrame as text
Picking rows when your index has two keys
One whole row, by label, as a Series
Natural logs on a DataFrame, with the mess cleaned up
Element-wise 'less than' between two DataFrames
'every value under this number?' in one node
The quick 'values below this threshold' mask
The per-column ceiling of your table
The average of every column, in one Series
The average that survives your outliers
The reshape that turns wide data into long data
The floor of every column, fast
The most common value in every column — all of them
Multiply two DataFrames, cell by cell
Scale an entire DataFrame by one number
Multiply a whole DataFrame by one integer
Multiply a DataFrame by one row's worth of values
Find where two DataFrames disagree, cell by cell
Flag every cell that isn't this number
Pandas Ne Scalar Int
Pandas Pivot
Pandas Pow
Pandas Pow Scalar Float
Pandas Pow Scalar Int
Pandas Pow Series
Pandas Rename
Pandas Rename Advanced
Pandas Replace
Pandas Replace Advanced
Pandas Save CSV
Pandas Save JSON
Pandas Select Column As Series
Pandas Select Columns
Pandas Select Rows
Pandas Series To DataFrame
Pandas Series To String
Pandas Set Index
Pandas Show DataFrame
Pandas Show Index
See what's actually inside your Pandas Series
The 'just let me see it' text viewer every workflow ends with
Apply sine to a whole DataFrame, non-numeric cells become NaN
Is your data lopsided? One node for skewness
Sort a DataFrame by a column, ascending or not
Standard deviation per column, in one node
Turn datetime columns into pretty strings
Subtract one DataFrame from another, cell by cell
Subtract one float from an entire DataFrame
Subtract a whole number from every row
Subtract a Series from every row of a DataFrame
Column totals, as a Series — the SQL SUM of the graph
The first node you should run on any new dataset
Apply tangent to a DataFrame — the math node that turns garbage to NaN
Turn messy date strings into real datetime columns
The bridge from DataFrame to numpy arrays
A whole DataFrame, as one big text blob
Rows become columns, columns become rows
How often does each value show up?
Per-column variance, because std alone doesn't tell the story
Stack Two DataFrames Into One Without Touching a Terminal
Cut a DataFrame in Half — Your Train/Test Split, in Two Nodes
Selecting Rows From a MultiIndex DataFrame, Sans Panic
A Date to a Filename-Ready String, Formatted Your Way
Turn a Number Into Text — Because Some Nodes Only Speak Strings
An Integer That Needs to Be Text? One Node, No Rounding Drama
Build a One-Key Dict From a Widget — Feed It Straight Into Pandas
A Key Plus an Integer Becomes a Dict — That's the Whole Trick
Stuff a Text Value Into a Dict — Multiline Welcome
See What's Actually in That List — and Render It as Text
30:00' Into a Real Datetime Object
Type a Python Dict Literal, Get a Real Dict, Feed Pandas
Parse a Number Out of a Text Field — With All the Float Quirks
Pull an Integer Out of Text — No Float Traps, Just Strictness
Type a Python List Literal, Get a Real List — Round Trip Included
Bar Charts Straight Out of Your DataFrame — This Is the Workhorse
Bar Chart a Tensor Directly — Skip the DataFrame Altogether
Distributions by Category, in One Node — Median, Quartiles, Outliers
This Heatmap Is Really a Correlation Matrix
One Column, One Histogram — Pixel Distributions and Everything Else
Histogram a tensor directly — no DataFrame detour
Line charts in ComfyUI — no Python, no leaving the graph
Line plots straight from a tensor, when you're already in tensor land
See every column against every other column at once
Spot a correlation without leaving ComfyUI
Scatter a tensor, skip the DataFrame
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.

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>
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:

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):
![]()
Installation
Note: GPU is not required to run this custom module.
Installation via ComfyUI Manager
- Press Manager button on the top menu bar to display ComfyUI Manager Menu.
- Click Custom Node Manager.
- In the search field, enter Data analysis.
- "ComfyUI-Data-Analysis" should be displayed. Select Install.
- Restart ComfyUI.
- Reload browser page.
Installation via git
-
Navigate to the
custom_nodesdirectory within your ComfyUI installation. -
Run the following command:
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.gitThis will create a new subdirectory ComfyUI-Data-Analysis.
-
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.
-
Check if your ComfyUI environment already has required packages listed in requirements.txt. If not, install them using pip.
pip install -r requirements.txtRefer to requirements.txt for the right versions.
-
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.