From fa7252c47b8dff92605001abcec95011cdde353d Mon Sep 17 00:00:00 2001 From: HowToSD Date: Thu, 13 Feb 2025 01:30:47 -0800 Subject: [PATCH] Added workflows and a sample table --- examples/datasets/fruit.csv | 101 ++++++++++++++++++++++++++ examples/workflows/load_csv.json | 1 + examples/workflows/select_subset.json | 1 + examples/workflows/sort.json | 1 + 4 files changed, 104 insertions(+) create mode 100644 examples/datasets/fruit.csv create mode 100644 examples/workflows/load_csv.json create mode 100644 examples/workflows/select_subset.json create mode 100644 examples/workflows/sort.json diff --git a/examples/datasets/fruit.csv b/examples/datasets/fruit.csv new file mode 100644 index 0000000..cc92d83 --- /dev/null +++ b/examples/datasets/fruit.csv @@ -0,0 +1,101 @@ +Name,Price,InStock,OnSale +fig,4.11,1,1 +safou,1.24,1,0 +papaya,5.11,1,1 +plum,2.53,1,1 +guava,0.66,1,1 +raspberry,9.99,1,0 +lucuma,6.4,0,1 +watermelon,11.46,0,1 +pawpaw,0.66,1,1 +lychee,9.62,0,1 +cantaloupe,11.8,1,0 +elderberry,9.65,1,1 +barberry,3.12,0,1 +nectarine,6.18,1,0 +tamarillo,6.8,0,0 +kiwi,12.25,0,0 +mango,3.12,1,0 +orange,0.54,0,1 +dragonfruit,2.57,1,1 +date,3.63,0,1 +gooseberry,3.31,0,1 +ackee,1.7,0,0 +yellow watermelon,5.69,1,0 +currant,7.64,0,0 +avocado,2.64,0,1 +longan,11.04,1,0 +starfruit,11.06,0,1 +cherimoya,3.09,0,1 +pequi,4.21,0,0 +soncoya,8.0,0,1 +pear,6.77,1,0 +buddha's hand,2.84,1,0 +mamey,5.16,1,0 +ogbono,10.55,1,0 +mulberry,12.91,0,1 +blackberry,3.89,1,1 +pomegranate,3.26,0,0 +jackfruit,7.2,0,1 +brazil nut fruit,11.64,1,0 +bignay,8.89,0,0 +clementine,1.22,0,1 +apricot,3.46,1,1 +miraclefruit,11.41,0,0 +persimmon,7.79,1,1 +pineapple,7.17,1,0 +voavanga,7.17,0,0 +monstera,4.33,0,1 +rambutan,12.39,1,1 +feijoa,7.32,1,1 +grumichama,12.64,1,0 +cloudberry,1.77,0,1 +honeydew,5.81,1,0 +tangerine,3.03,1,1 +jabuticaba,3.63,1,0 +nance,11.33,0,1 +blueberry,4.93,0,1 +cupuacu,6.41,0,0 +bilberry,5.34,0,0 +soursop,9.22,0,0 +sweetsop,3.48,1,1 +grape,8.43,0,0 +cranberry,10.66,1,1 +peach,3.37,1,0 +atemoya,1.6,0,0 +breadfruit,1.36,0,1 +loganberry,10.62,1,1 +platonia,8.93,1,1 +quince,6.23,1,0 +banana,5.97,0,0 +cherry,8.98,0,1 +coconut,3.27,1,0 +mangosteen,4.34,0,1 +surinam cherry,3.62,0,1 +boysenberry,2.24,1,1 +ilama,6.85,0,0 +medlar,11.05,0,0 +kumquat,7.6,0,1 +apple,12.85,0,0 +santol,0.79,1,1 +passionfruit,11.56,0,0 +strawberry,10.67,0,0 +durian,4.6,1,1 +red currant,2.01,0,1 +black currant,11.76,0,1 +red currant,1.56,0,0 +black currant,8.4,0,0 +red currant,11.06,1,1 +black currant,9.25,0,0 +red currant,10.05,1,1 +black currant,9.24,1,1 +red currant,2.59,0,0 +black currant,0.51,1,0 +red currant,1.52,1,1 +black currant,9.33,1,1 +red currant,3.17,1,1 +black currant,8.15,0,1 +red currant,7.71,0,1 +black currant,4.41,1,0 +red currant,2.18,0,0 +black currant,0.8,1,1 diff --git a/examples/workflows/load_csv.json b/examples/workflows/load_csv.json new file mode 100644 index 0000000..6cc7c09 --- /dev/null +++ b/examples/workflows/load_csv.json @@ -0,0 +1 @@ +{"last_node_id":2,"last_link_id":1,"nodes":[{"id":1,"type":"PandasLoadCSV","pos":[490.4385070800781,2068.794921875],"size":[410.5992736816406,95.68482208251953],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[1],"slot_index":0}],"properties":{"Node name for S&R":"PandasLoadCSV"},"widgets_values":["./custom_nodes/ComfyUI-Data-Analysis/examples/datasets/fruit.csv"]},{"id":2,"type":"PandasShowDataFrame","pos":[1063.93798828125,2068.40283203125],"size":[323.9862976074219,238.33462524414062],"flags":{},"order":1,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":1,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6}],"properties":{"Node name for S&R":"PandasShowDataFrame"},"widgets_values":[""," Name Price InStock OnSale\n0 fig 4.11 1.0 1\n1 safou 1.24 1.0 0\n2 papaya 5.11 1.0 1\n3 plum 2.53 1.0 1\n4 guava 0.66 1.0 1\n.. ... ... ... ...\n95 black currant 8.15 0.0 1\n96 red currant 7.71 0.0 1\n97 black currant 4.41 1.0 0\n98 red currant 2.18 0.0 0\n99 black currant 0.80 1.0 1\n\n[100 rows x 4 columns]"]}],"links":[[1,1,0,2,0,"STRING"]],"groups":[],"config":{},"extra":{"ds":{"scale":1.1498879805425606,"offset":[-454.3122480950786,-1970.7113583389635]},"node_versions":{"ComfyUI-Data-Analysis":"235c84b7b8aafc3c4b904ba8f03c89aade96b640"},"ue_links":[]},"version":0.4} \ No newline at end of file diff --git a/examples/workflows/select_subset.json b/examples/workflows/select_subset.json new file mode 100644 index 0000000..5eeeba7 --- /dev/null +++ b/examples/workflows/select_subset.json @@ -0,0 +1 @@ +{"last_node_id":5,"last_link_id":5,"nodes":[{"id":1,"type":"PandasLoadCSV","pos":[353.8526611328125,2105.062255859375],"size":[410.5992736816406,95.68482208251953],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[2,4],"slot_index":0}],"properties":{"Node name for S&R":"PandasLoadCSV"},"widgets_values":["./custom_nodes/ComfyUI-Data-Analysis/examples/datasets/fruit.csv"]},{"id":3,"type":"PandasSelectColumns","pos":[792.3731079101562,1956.5699462890625],"size":[349.8414306640625,115.1163558959961],"flags":{},"order":1,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":2,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":[3],"slot_index":0}],"properties":{"Node name for S&R":"PandasSelectColumns"},"widgets_values":["","Name, Price"]},{"id":2,"type":"PandasShowDataFrame","pos":[1223.672119140625,1952.651123046875],"size":[323.9862976074219,238.33462524414062],"flags":{},"order":3,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":3,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6}],"properties":{"Node name for S&R":"PandasShowDataFrame"},"widgets_values":[""," Name Price\n0 fig 4.11\n1 safou 1.24\n2 papaya 5.11\n3 plum 2.53\n4 guava 0.66\n.. ... ...\n95 black currant 8.15\n96 red currant 7.71\n97 black currant 4.41\n98 red currant 2.18\n99 black currant 0.80\n\n[100 rows x 2 columns]"]},{"id":4,"type":"PandasSelectRows","pos":[780.7979125976562,2289.15966796875],"size":[390.7399597167969,111.2580337524414],"flags":{},"order":2,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":4,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":[5],"slot_index":0}],"properties":{"Node name for S&R":"PandasSelectRows"},"widgets_values":["","Price < 1"]},{"id":5,"type":"PandasShowDataFrame","pos":[1231.45263671875,2293.01708984375],"size":[301.1099548339844,161.65524291992188],"flags":{},"order":4,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":5,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6}],"properties":{"Node name for S&R":"PandasShowDataFrame"},"widgets_values":[""," Name Price InStock OnSale\n4 guava 0.66 1 1\n8 pawpaw 0.66 1 1\n17 orange 0.54 0 1\n78 santol 0.79 1 1\n91 black currant 0.51 1 0\n99 black currant 0.80 1 1"]}],"links":[[2,1,0,3,0,"STRING"],[3,3,0,2,0,"STRING"],[4,1,0,4,0,"STRING"],[5,4,0,5,0,"STRING"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.8639278591604511,"offset":[-331.6863902845917,-1872.4571513539743]},"node_versions":{"ComfyUI-Data-Analysis":"235c84b7b8aafc3c4b904ba8f03c89aade96b640"},"ue_links":[]},"version":0.4} \ No newline at end of file diff --git a/examples/workflows/sort.json b/examples/workflows/sort.json new file mode 100644 index 0000000..59f3312 --- /dev/null +++ b/examples/workflows/sort.json @@ -0,0 +1 @@ +{"last_node_id":8,"last_link_id":11,"nodes":[{"id":1,"type":"PandasLoadCSV","pos":[341.50604248046875,1996.256103515625],"size":[410.5992736816406,95.68482208251953],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[6],"slot_index":0}],"properties":{"Node name for S&R":"PandasLoadCSV"},"widgets_values":["./custom_nodes/ComfyUI-Data-Analysis/examples/datasets/fruit.csv"]},{"id":6,"type":"PandasSort","pos":[797.7749633789062,1987.430908203125],"size":[210,132.86476135253906],"flags":{},"order":2,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":6,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":[8,10],"slot_index":0}],"properties":{"Node name for S&R":"PandasSort"},"widgets_values":["","Price",false]},{"id":7,"type":"PandasHead","pos":[794.6879272460938,2368.64111328125],"size":[210,91.96627807617188],"flags":{},"order":4,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":10,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":[11],"slot_index":0}],"properties":{"Node name for S&R":"PandasHead"},"widgets_values":["",3]},{"id":8,"type":"MarkdownNote","pos":[786.199462890625,2250.57421875],"size":[227.97030639648438,68.48837280273438],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["# Show top 3"],"color":"#432","bgcolor":"#653"},{"id":2,"type":"PandasShowDataFrame","pos":[1094.8031005859375,1988.14794921875],"size":[323.9862976074219,238.33462524414062],"flags":{},"order":3,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":8,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6}],"properties":{"Node name for S&R":"PandasShowDataFrame"},"widgets_values":[""," Name Price InStock OnSale\n34 mulberry 12.91 0 1\n77 apple 12.85 0 0\n49 grumichama 12.64 1 0\n47 rambutan 12.39 1 1\n15 kiwi 12.25 0 0\n.. ... ... ... ...\n78 santol 0.79 1 1\n8 pawpaw 0.66 1 1\n4 guava 0.66 1 1\n17 orange 0.54 0 1\n91 black currant 0.51 1 0\n\n[100 rows x 4 columns]"]},{"id":5,"type":"PandasShowDataFrame","pos":[1105.6707763671875,2374.0419921875],"size":[288.7632141113281,130.78851318359375],"flags":{},"order":5,"mode":0,"inputs":[{"name":"dataframe_json","type":"STRING","link":11,"widget":{"name":"dataframe_json"}}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6}],"properties":{"Node name for S&R":"PandasShowDataFrame"},"widgets_values":[""," Name Price InStock OnSale\n34 mulberry 12.91 0 1\n77 apple 12.85 0 0\n49 grumichama 12.64 1 0"]}],"links":[[6,1,0,6,0,"STRING"],[8,6,0,2,0,"STRING"],[10,6,0,7,0,"STRING"],[11,7,0,5,0,"STRING"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.8639278591604511,"offset":[-331.6863902845917,-1872.4571513539743]},"node_versions":{"ComfyUI-Data-Analysis":"235c84b7b8aafc3c4b904ba8f03c89aade96b640"},"ue_links":[]},"version":0.4} \ No newline at end of file