Commit graph

18 commits

Author SHA1 Message Date
Justus Kuhlmann
e97cc519a9
taking care of cols with only None values (#184) 2023-05-22 12:37:46 +01:00
Justus Kuhlmann
a5b6f69160
Slightly better Typechecking when exporting to SQL (#174)
* corret type clause

* add tests, changes in create_json_string

* create json-string now gives back None

* revert changes

* fix panda sql export

* add SQL test

* fixed None type export for csv and sql.gz

* move None parsing to json io

* alter regex

* revert changes

* only replace None with empty str when necessary

* fixed deserialze_df for python 3.7

* add more tesets

* fix case where gz was ignored

* hand voer gz explicitly

* replace nan  by None in non-Obs columns

* moved warning to csv export, mroe tests

* only values able to be nan are put in np.isnan()

* added python float for warning
2023-05-18 17:11:52 +01:00
Fabian Joswig
3c942b380d
Serialize list of Obs in pandas.to_sql (#162)
* feat: Added serialization of list of Obs in pandas.to_sql.

* tests: test for list of Obs to sql added.

* feat: auto_gamma functionality added for deserialization of lists of
Obs.
2023-03-10 14:17:20 +00:00
Justus Kuhlmann
26447d658c
better docstrings (#144)
* first example of returns statement in docstring

* added a some return statements for pandas API

* last return statements in pandas input

* added returns to bdio docstrings

* few returns statements added to docstring

* finished docstrings for hadrons submodule

* also finished docstrings for json submodule

* finished misc submodule

* added returns in docstrings in openqQCD

* made some cosmetic chanes to dostrings

* added return nad return statement in docstring

* linting

* Improved docstrings of mpm, fits, roots, misc to have return statements

returns added for misc.py

returns added for mpm.py

reutrns added for fits.py

* linting...

* Some polishing of docstrings
2023-01-16 14:57:22 +00:00
Fabian Joswig
18b3672b2d feat: kwargs added to pandas sql methods 2022-07-06 11:34:26 +01:00
Fabian Joswig
de51d6ca07 refactor: pandas.read_sql_query renamed to read_sql and can now also
directly extract full tables.
2022-07-05 13:31:41 +01:00
Fabian Joswig
a6ebcb59bb feat: default value for if_exist in to_sql changed to fail, test for
this behavior added.
2022-07-04 17:22:35 +01:00
Fabian Joswig
845b4e60ac fix: pandas.to_sql does not write an index to the db anymore, docs
extended, test added.
2022-07-04 17:08:20 +01:00
Fabian Joswig
54789f7fe6 build: sqlite3 added as requirement. 2022-07-04 16:54:51 +01:00
Fabian Joswig
f58ef11845 refactor: pandas serialize and deserialize removed from global
namespace.
2022-07-04 14:59:17 +01:00
Fabian Joswig
265bad3ed8 feat: sqlite functionality added to pandas submodule. 2022-07-04 14:56:59 +01:00
Fabian Joswig
dc45894b64 fix: json format detection in deserialization of pandas dataframe made
more general and less dependant on the json implementation.
2022-07-04 14:47:01 +01:00
Fabian Joswig
cc9f47c686 feat: pandas DataFrame serialization and deserialization can now also
deal with gzipped json columns. Tests added.
2022-07-04 14:19:30 +01:00
Fabian Joswig
e1a760a058 refactor: refactored pandas serialize and deserialize functions. 2022-07-04 12:04:19 +01:00
Fabian Joswig
c6ec11045c fix: redundant export of not gzipped pandas Dataframe removed. 2022-06-30 15:49:40 +01:00
Fabian Joswig
153cc795b8 feat: pandas DataFrames with Corr columns can now also be imported and
exported.
2022-06-30 15:26:31 +01:00
Fabian Joswig
29820f8e61 fix: don't write index column to csv file in input.pandas.dump_df. 2022-06-30 14:12:51 +01:00
Fabian Joswig
42a6dbddd4 feat: dump and load functionality for pandas dataframes containing Obs
objects added.
2022-06-30 14:05:11 +01:00