Closed dllahr closed 6 years ago
Hi Dave! Good catch, and thanks for adding tests too! :)
Thanks for the fix, @dllahr.
EDIT: Also I fixed a bug in write_gct.write_gct where it was ignoring all input arguments and using hard-coded ones in its call to write. Might consider deleting write_gct since it is redundant?
I vote in favor.
Whoops my bad, missed the edit. According to the docstrings it's for backwards compatibility though...? Not super familiar
I think that addition was for some init.py things that we had been working on: 5c933fc
I done it. https://github.com/cmap/cmapPy/commit/9f03dd2b5c860fbd5d7e5567b6c3209399150ff1
Hello friends! I noticed that when I was using
write_gct
the resulting text files were written out with the maximum number of decimal places (based on the float type used) and thedata_float_format
parameter was ignored.Short version: this pull request fixes that problem.
Long version:
pandas.DataFrame.to_csv
was ignoring thefloat_format
option because in the methodwrite_bottom_half
the dataframe that is written is entirely of typeobject
- it only applies thefloat_format
parameter to floats. So I changed how we make that dataframe, keeping the left bottom half as typeobject
and making the right bottom half exactly what the contents ofdata_df
are.EDIT: Also I fixed a bug in write_gct.write_gct where it was ignoring all input arguments and using hard-coded ones in its call to write. Might consider deleting write_gct since it is redundant?