Mercurial > repos > iuc > table_compute
comparison scripts/table_compute.py @ 4:93a3ce78ce55 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/table_compute commit d741508e5ed912cdeee4f67ec8451b6e6865363c"
author | iuc |
---|---|
date | Tue, 20 Apr 2021 15:46:10 +0000 |
parents | 02c3e335a695 |
children | 3bf5661c0280 |
comparison
equal
deleted
inserted
replaced
3:60ff16842fcd | 4:93a3ce78ce55 |
---|---|
312 melt_values = params["MELT"]["melt_values"] | 312 melt_values = params["MELT"]["melt_values"] |
313 | 313 |
314 out_table = pd.melt(data, id_vars=melt_ids, value_vars=melt_values) | 314 out_table = pd.melt(data, id_vars=melt_ids, value_vars=melt_values) |
315 elif general_mode == "pivot": | 315 elif general_mode == "pivot": |
316 pivot_index = params["PIVOT"]["pivot_index"] | 316 pivot_index = params["PIVOT"]["pivot_index"] |
317 pivot_column = params["PIVOT"]["pivot_column"] | 317 pivot_column = params["PIVOT"]["pivot_columns"] |
318 pivot_values = params["PIVOT"]["pivot_values"] | 318 pivot_values = params["PIVOT"]["pivot_values"] |
319 | 319 pivot_aggfunc = params["PIVOT"]["pivot_aggfunc"] |
320 out_table = data.pivot( | 320 |
321 index=pivot_index, columns=pivot_column, values=pivot_values | 321 if not(pivot_aggfunc): |
322 ) | 322 out_table = data.pivot( |
323 index=pivot_index, columns=pivot_column, values=pivot_values | |
324 ) | |
325 else: | |
326 out_table = data.pivot_table( | |
327 index=pivot_index, columns=pivot_column, values=pivot_values, | |
328 aggfunc=pivot_aggfunc | |
329 ) | |
330 | |
323 elif general_mode == "custom": | 331 elif general_mode == "custom": |
324 custom_func = params["fulltable_customop"] | 332 custom_func = params["fulltable_customop"] |
325 | 333 |
326 def fun(tableau): | 334 def fun(tableau): |
327 """Dummy Function""" | 335 """Dummy Function""" |