Major refactoring to pass DataFrame object without serializing. Almost all nodes were modified for this. Binary operator nodes were added as well.

This commit is contained in:
HowToSD
2025-02-17 22:45:10 -08:00
parent ae59dec59d
commit ec95289880
75 changed files with 1046 additions and 334 deletions
+4 -4
View File
@@ -26,7 +26,7 @@ class MPLBar:
CATEGORY: str = "Data Analysis"
def bar_chart(self,
dataframe_json: str,
dataframe: pd.DataFrame,
x_column_name: str,
y_column_name: str,
title: str,
@@ -37,7 +37,7 @@ class MPLBar:
Generates a bar chart from a pandas DataFrame.
Args:
dataframe_json (str): A JSON string representation of the DataFrame.
dataframe (DataFrame): The DataFrame.
x_column_name (str): The column name for the x-axis.
y_column_name (str): The column name for the y-axis.
title (str): The title of the plot.
@@ -49,8 +49,8 @@ class MPLBar:
Returns:
tuple: A tuple containing the image tensor representation of the plot.
"""
# Deserialize JSON string to DataFrame
df = pd.read_json(StringIO(dataframe_json))
df = dataframe
# Create the plot
fig, ax = plt.subplots()