Open alixdamman opened 3 years ago
I wonder if it wouldn't be more logical to invert position and range. In test_make_plot that would be:
sheet["B8"].make_plot("B2")
Also, the dump and make_plot calls look alien to each other. One is a method on the source, the other on the target.
sheet["B2"] = population_be.dump()
sheet["B2"].make_plot("B8")
It would be better to have similar syntaxes for both. Either:
sheet["B2"] = population_be.dump()
sheet["B8"] = population_be.plot(data="B2") # <-- bad syntax because population_be is not really used UNLESS we make it dump the data too
or
sheet["B2"].add_table(population_be)
sheet["B8"].add_plot(data_source="B2")
implementing add_table and add_plot could be a way to tackle #826, #900, and #967.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Shouldn't add_table create Excel tables (potentially as an option)?
What do you mean by "Excel tables" ?
Shouldn't add_table create Excel tables (potentially as an option)?
What do you mean by "Excel tables" ?
A data range which uses the "format as Table" Excel feature (usually with an header row and autofilters).
to be closer to a replacement for the ExcelReport API, we could allow passing an array as the datasource and add a data_sheet (or dump_data_to or whatever it is called) argument to add_plot;
sheet["B8"].add_plot(data_source=population_be, data_sheet="data")
would be equivalent to:
datasheet = workbook[data_sheet]
pos = (datasheet.shape[0], 0)
datasheet[pos] = population_be.dump()
sheet["B8"].add_plot(data_source=datasheet[pos])
Tentatively added to 0.34 milestone (using the assumption that I take over your code), unsure I will have time to do that.
Tentatively added to 0.34 milestone (using the assumption that I take over your code), unsure I will have time to do that.
OK. Please do.
TODO @alixdamman : add method documentation + update Tutorial