Files
HowToSD-ComfyUI-Data-Analysis/docs/reference/node_reference.md
T

24 KiB

Node Reference

Aggregation

Node Description
Pandas Group By Computes aggregate values for groups in a DataFrame.

Arithmetic method

Node Description
Pandas Add Adds two pandas DataFrames.
Pandas Add Scalar Float Adds a floating-point number to a Pandas DataFrame.
Pandas Add Scalar Int Adds an integer to a Pandas DataFrame.
Pandas Add Series Adds a Pandas Series to a pandas DataFrames.
Pandas Div Divides a Pandas DataFrame by another DataFrame.
Pandas Div Scalar Float Divides a Pandas DataFrame by a floating-point number.
Pandas Div Scalar Int Divides a Pandas DataFrame by an integer.
Pandas Div Series Divides a Pandas DataFrame by a Pandas Series.
Pandas Mul Multiplies two pandas DataFrames.
Pandas Mul Scalar Float Multiplies a Pandas DataFrame by a floating-point number.
Pandas Mul Scalar Int Multiplies a Pandas DataFrame by a floating-point number.
Pandas Mul Series Multiplies a Pandas DataFrame by a Pandas Series.
Pandas Pow Exponentiates two pandas DataFrames.
Pandas Pow Scalar Float Raises a Pandas DataFrame to the power of a floating-point number.
Pandas Pow Scalar Int Raises a Pandas DataFrame to the power of an integer.
Pandas Pow Series Raises a Pandas DataFrame to the power of a Pandas Series.
Pandas Sub Subtracts a Pandas DataFrame from another DataFrame.
Pandas Sub Scalar Float Subtracts a floating-point number from a Pandas DataFrame.
Pandas Sub Scalar Int Subtracts an integer from a Pandas DataFrame.
Pandas Sub Series Subtracts a Pandas Series from a Pandas DataFrame.

Categorical summary

Node Description
Pandas Crosstab Creates a contingency table (crosstab, or cross-tabulation) from two or more columns in a DataFrame.
Pandas Value Counts Creates a frequency table from one or more columns in a DataFrame.

Cumulative calculations

Node Description
Pandas Cummax Computes the cummax (cumulative max) of the DataFrame.
Pandas Cummin Computes the cummin (cumulative minimum) of the DataFrame.
Pandas Cumprod Computes the cumprod (cumulative product) of the DataFrame.
Pandas Cumsum Computes the cumsum (cumulative sum) of the DataFrame.

Data cleansing

Node Description
Pandas Drop Duplicates Drops duplicate rows from a Pandas DataFrame.
Pandas Drop NA Drops missing values from a pandas DataFrame.
Pandas Fill NA Scalar Float Replaces missing values in a Pandas DataFrame with a floating-point number.
Pandas Fill NA Scalar Int Replaces missing values in a Pandas DataFrame with an integer.
Pandas Is NA Checks a pandas DataFrame for missing values.
Pandas Replace Replaces part or all of a string in each DataFrame cell with a specified string using a wildcard for matching. If you want to remove some characters, then leave the replace_string field blank.

Data subset selection

Node Description
Pandas Head Retrieves the first few rows of a pandas DataFrame.
Pandas Iloc Row Series Selects a row from a pandas DataFrame and returning it as a Series.
Pandas Iloc Rows Data Frame Selects rows from a pandas DataFrame and returning it as a DataFrame.
Pandas Iloc Rows Slice Data Frame Selects rows from a pandas DataFrame using a slice defined by a start and end integer position. The start position is inclusive, while the end position is exclusive. Returns the selected rows as a DataFrame.
Pandas Loc Cell Str Selects a cell from a pandas DataFrame and output as a string.
Pandas Loc Row MultiIndex DataFrame Selects a row or rows from a pandas DataFrame with MultiIndex and output as a DataFrame.
Pandas Loc Row Series Selects a row from a pandas DataFrame and output as a Series.
Pandas Select Columns Selects specific columns from a pandas DataFrame.
Pandas Select Rows Selects specific rows from a pandas DataFrame based on a condition. This node internally calls DataFrame.query().
Pandas Xs Selects a subset of a Pandas DataFrame using specified index labels or positions.

Data type conversion

Node Description
Pandas As Float Converts all cells in a pandas DataFrame to float type.
Pandas As Int Converts all cells in a pandas DataFrame to integer type.
Pandas As String Converts all cells in a pandas DataFrame to string type.
Pandas To Numpy Converts a pandas DataFrame to Numpy ndarray.

DataFrame information

Node Description
Pandas Columns Retrieves the column labels of a pandas DataFrame.
Pandas Index Retrieves the row labels (index) of a pandas DataFrame.

Date and time processing

Node Description
Pandas Strftime Converts one or more datetime columns in a DataFrame to string columns.
Pandas To Datetime Converts one or more string columns in a DataFrame to datetime columns.

Display data

Node Description
CDA Show Float Displays a floating-point number as text.
CDA Show Int Displays a Pandas Int as text.
Pandas Index To String Converts a pandas Index to a string representation.
Pandas Series To String Converts a pandas Series to a string representation.
Pandas Show Data Frame Displays a Pandas DataFrame as text.
Pandas Show Index Displays a Pandas Index as text.
Pandas Show Series Displays a Pandas Series as text.
Pandas Show Text Displays a string.
Pandas To String Converts a pandas DataFrame to a string representation.
Pt Show Size Displays PyTorch Size object as a string.
Pt Show Text Displays PyTorch tensor as a string. Note that the tensor is partially printed out when

IO

Node Description
CDA Float Create Creates a Python float using a value entered in the text field.
CDA Int Create Creates a Python int using a value entered in the text field.
CDA JSON Create Creates a serialized JSON object using values entered in the text field.
CDA String Create Creates a Python String using a value entered in a single-line text field.
CDA Text Create Creates a Python String using a value entered in a multi-line text field.
Pandas Create Creates a pandas DataFrame using values entered in the text field.
Pandas Create From Dict Creates a pandas DataFrame from a Python dictionary.
Pandas Create From Multiple Dict Creates a pandas DataFrame from multiple Python dictionaries.
Pandas Create From Numpy Creates a pandas DataFrame from a NumPy ndarray.
Pandas Create Series From Dict Creates a Pandas Series from a Python dictionary.
Pandas Create With Index Creates a pandas DataFrame using values entered in the text field. Input data is assumed to have an index.
Pandas Load CSV Loads CSV files into a pandas DataFrame.
Pandas Load CSV With Encoding Loads CSV files into a pandas DataFrame.
Pandas Load CSV With Index Loads CSV files into a pandas DataFrame.
Pandas Load HTML Scans an HTML file or webpage for tables and returns the number of DataFrames
Pandas Load JSON Loads JSON files into a pandas DataFrame.
Pandas Save CSV Saves a PandasDataFrame to a CSV file.
Pandas Save JSON Saves a PandasDataFrame to a JSON file.

Math

Node Description
Pandas Cos Apply the cosine function to a pandas DataFrame and converting non-numeric values to NaN.
Pandas Exp Apply the exponential function to a pandas DataFrame and converting non-numeric values to NaN.
Pandas Log Applying the natural logarithm function to a pandas DataFrame and converting non-numeric values to NaN.
Pandas Sin Applies the sine function to a pandas DataFrame and converting non-numeric values to NaN.
Pandas Tan Applies the tangent function to a pandas DataFrame and converting non-numeric values to NaN.

Miscellaneous

Node Description
Pt Flatten Flattens a PyTorch tensor into a 1D tensor.

Numpy

Node Description
Numpy Float Create Creates a NumPy ndarray with 32-bit floating point precision
Numpy Int Create Creates a NumPy ndarray with 32-bit integer
Numpy Show Displays a Numpy ndarray as text.
Numpy Squeeze Removes a dimension at the specified position in the input array if it is of size 1.

Plot

Node Description
MPL Bar Chart Generates a bar chart from a Pandas DataFrame.
MPL Line Plot Generates a line plot from a pandas DataFrame.
MPL Pie Chart Generates a pie chart from a pandas DataFrame.
MPL Scatter Plot Generates a scatter plot from a pandas DataFrame.
SNS Bar Chart Generates a bar chart from a Pandas DataFrame using Seaborn.
SNS Boxplot Generates a boxplot from a Pandas DataFrame using Seaborn.
SNS Histogram Generates a histogram from a Pandas DataFrame using Seaborn.
SNS Line Plot Generates a line plot from a pandas DataFrame using Seaborn.
SNS Scatter Plot Generates a scatter plot from a pandas DataFrame using Seaborn.

PyTorch wrapper - Arithmetic operations

Node Description
Pt Add Adds two PyTorch tensors.
Pt Div Divides one PyTorch tensor by another element-wise.
Pt Floor Div Performs element-wise floor division on two PyTorch tensors.
Pt Mul Multiplies two PyTorch tensors element-wise.
Pt Pow Raises one PyTorch tensor to the power of another element-wise.
Pt Remainder Computes the element-wise remainder of division between two PyTorch tensors.
Pt Sub Subtracts one PyTorch tensor from another.

PyTorch wrapper - Bitwise operations

Node Description
Pt Bitwise And Performs a bitwise AND operation on two PyTorch tensors element-wise.
Pt Bitwise Left Shift Performs a bitwise left shift operation on two PyTorch tensors element-wise.
Pt Bitwise Not Performs a bitwise NOT operation on a PyTorch tensor element-wise.
Pt Bitwise Or Performs a bitwise OR operation on two PyTorch tensors element-wise.
Pt Bitwise Right Shift Performs a bitwise right shift operation on two PyTorch tensors element-wise.
Pt Bitwise Xor Performs a bitwise XOR operation on two PyTorch tensors element-wise.

PyTorch wrapper - Comparison operations

Node Description
Pt Eq Tests whether two PyTorch tensors are equal element-wise.
Pt Ge Tests whether elements in the first PyTorch tensor are greater than or equal to the corresponding elements in the second tensor.
Pt Gt Tests whether elements in the first PyTorch tensor are greater than the corresponding elements in the second tensor.
Pt Le Tests whether elements in the first PyTorch tensor are less than or equal to the corresponding elements in the second tensor.
Pt Lt Tests whether elements in the first PyTorch tensor are less than the corresponding elements in the second tensor.
Pt Ne Tests whether two PyTorch tensors are not equal element-wise.

PyTorch wrapper - Indexing and Slicing Operations

Node Description
Pt Gather Generates a tensor based on the index tensor using PyTorch's gather function.
Pt Index Select Extracts elements from the input tensor along a specified dimension using an index tensor.
Pt Masked Select Extracts elements from the input tensor whose corresponding value in masked_tens is True.
Pt Scatter Generates a new tensor by replacing values at specified positions using an index tensor.
Pt Where Generates a new tensor by selecting values based on a condition tensor.

PyTorch wrapper - Logical operations

Node Description
Pt Logical And Performs a logical AND operation on two PyTorch tensors element-wise.
Pt Logical Not Performs a logical NOT operation on a PyTorch tensor element-wise.
Pt Logical Or Performs a logical OR operation on two PyTorch tensors element-wise.
Pt Logical Xor Performs a logical XOR operation on two PyTorch tensors element-wise.

PyTorch wrapper - Math operations

Node Description
Pt Abs Computes the absolute value of each element in a PyTorch tensor.
Pt Acos Computes the arccosine (inverse cosine) of a PyTorch tensor element-wise.
Pt Asin Computes the arcsine (inverse sine) of a PyTorch tensor element-wise.
Pt Atan Computes the arc tangent (inverse tangent) of a PyTorch tensor element-wise.
Pt Cos Computes the cosine of a PyTorch tensor element-wise.
Pt Cosh Computes the hyperbolic cosine of a PyTorch tensor element-wise.
Pt Exp Performs an exponential operation on a PyTorch tensor element-wise.
Pt Log Computes the natural logarithm (log base e) of a PyTorch tensor element-wise.
Pt Neg Computes the negation of each element in a PyTorch tensor.
Pt Sin Computes the sine of a PyTorch tensor element-wise.
Pt Sinh Computes the hyperbolic sine of a PyTorch tensor element-wise.
Pt Sqrt Computes the square root of each element in a PyTorch tensor.
Pt Tan Computes the tangent of a PyTorch tensor element-wise.
Pt Tanh Computes the hyperbolic tangent of a PyTorch tensor element-wise.

PyTorch wrapper - Matrix operations

Node Description
Pt Bmm Performs batched matrix multiplication on two 3D PyTorch tensors.
Pt Einsum Performs Tensor operations specified in the Einstein summation equation.
Pt Mat Mul Performs matrix multiplication on two PyTorch tensors.
Pt Mm Performs 2D matrix multiplication on two PyTorch tensors.

PyTorch wrapper - Reduction operation & Summary statistics

Node Description
Pt Argmax Computes the indices of the maximum values of a PyTorch tensor along the specified dimension(s).
Pt Argmin Computes the indices of the minimum values of a PyTorch tensor along the specified dimension(s).
Pt Max Computes the maximum values of a PyTorch tensor along the specified dimension(s).
Pt Mean Computes the mean of a PyTorch tensor along the specified dimension(s).
Pt Median Computes the median of a PyTorch tensor along the specified dimension(s).
Pt Min Computes the minimum values of a PyTorch tensor along the specified dimension(s).
Pt Prod Computes the product of a PyTorch tensor along the specified dimension(s).
Pt Std Computes the standard deviation of a PyTorch tensor along the specified dimension(s).
Pt Sum Computes the sum of a PyTorch tensor along the specified dimension(s).
Pt Var Computes the variance of a PyTorch tensor along the specified dimension(s).

PyTorch wrapper - Size object support

Node Description
Pt Size Extracts the PyTorch Size object of a PyTorch tensor using the size() method.
Pt Size Create Creates a PyTorch Size using values entered in the text field.
Pt Size To Numpy Converts PyTorch Size object to NumPy ndarray.
Pt Size To String Converts PyTorch Size object to a Python string.

PyTorch wrapper - Tensor creation

Node Description
Pt Bool Create Creates a PyTorch tensor of dtype bool from True or False values entered as a list in the text field.
Pt Float Create Creates a PyTorch tensor with 32-bit floating point precision
Pt From Image Casts an Image tensor as a PyTorch tensor.
Pt From Latent Casts a latent tensor as a PyTorch tensor.
Pt From Numpy Converts a NumPy ndarray to a PyTorch tensor while preserving its data type.
Pt Full Creates a PyTorch tensor filled with a specified value using the size entered in the text field.
Pt Int Create Creates a PyTorch tensor with 32-bit integer
Pt Ones Creates a PyTorch tensor of ones using the size entered in the text field.
Pt Rand Creates a PyTorch tensor with values sampled from a uniform distribution
Pt Rand Int Creates a PyTorch tensor filled with random integers within a specified range using the size entered in the text field.
Pt Randn Creates a PyTorch tensor with values sampled from a standard normal distribution (mean=0, std=1)
Pt Zeros Creates a PyTorch tensor of zeros using the size entered in the text field.

PyTorch wrapper - Tensor data conversion

Node Description
Pt To Image Casts a PyTorch tensor as an Image tensor.
Pt To Latent Casts a PyTorch tensor as a latent tensor.
Pt To Numpy Converts PyTorch tensor to NumPy ndarray.
Pt To Rgb Tensors Splits a PyTorch tensor into R, G, and B tensors.

PyTorch wrapper - Transform

Node Description
Pt Permute Permutes the dimensions of a PyTorch tensor according to the specified order.
Pt Reshape Reshapes a PyTorch tensor into a specified shape using torch.reshape().
Pt Squeeze Removes a dimension at the specified position in the input tensor if it is of size 1.
Pt Unsqueeze Adds a singleton dimension at the specified position in the input tensor.
Pt View Reshapes a PyTorch tensor into a specified shape using torch.view().

Python wrapper

Node Description
Py Kv Float Create Creates a Python dictionary with a string key and a float value.
Py Kv Int Create Creates a Python dictionary with an string key and an integer value.
Py Kv String Create Creates a Python dictionary with a string key and a string value.

Summary statistics

Node Description
Pandas Corr Computes the correlation of the DataFrame. You can select from the Pearson, Kendall or Spearman methods.
Pandas Count Computes the count of a pandas DataFrame.
Pandas Cov Computes the covariance of the DataFrame.
Pandas Kurtosis Computes the unbiased kurtosis of the DataFrame.
Pandas Max Computes the max of a pandas DataFrame.
Pandas Mean Computes the mean of a pandas DataFrame.
Pandas Median Computes the median of a pandas DataFrame.
Pandas Min Computes the min of a pandas DataFrame.
Pandas Mode Computes the mode of a pandas DataFrame.
Pandas Skew Computes the unbiased skewness of the DataFrame.
Pandas Std Computes the standard deviation of a pandas DataFrame.
Pandas Sum Computes the sum of a pandas DataFrame.
Pandas Summary Analyzes and summarizes a pandas DataFrame.
Pandas Var Computes the variance of a pandas DataFrame.

Transformation

Node Description
Pandas Feature Split To Numpy Splits a Pandas DataFrame into feature Numpy ndarray and label Numpy ndarray.
Pandas Horizontal Concat Horizontally concatenates two pandas DataFrames.
Pandas Horizontal Split Horizontally splits a Pandas DataFrame into two pandas DataFrames.
Pandas Join Merges two pandas DataFrames based on a common column.
Pandas Melt Performs an unpivot operation (melt) on a pandas DataFrame.
Pandas Pivot Computes a pivot table from a pandas DataFrame.
Pandas Rename Renames an index (row label) or a column label.
Pandas Series To Data Frame Converts a Pandas Series to a DataFrame.
Pandas Set Index Create index (row label) from existing column or columns.
Pandas Sort Sorts a pandas DataFrame by a specified column.
Pandas Transpose Transposes a DataFrame.
Pandas Vertical Concat Vertically concatenates two pandas DataFrames.
Pandas Vertical Split Vertically splits a Pandas DataFrame into two pandas DataFrames.