Commit graph

15 commits

Author SHA1 Message Date
Fabian Joswig
682d23604d
[Fix] Pandas 3 string type changes (#278)
* [Fix] Pandas 3 string type handling

* [ci] Temporarily remove WError because of scipy deprecation

* [Fix] Address edge cases in _deserialize_df

- Use pd.isna() instead of truthiness check for gzip null guard, fixing
  incorrect behavior when null is np.nan (which is truthy in Python)
- Add bounds check to while loop to prevent IndexError when all non-null
  values are empty strings converted to None by regex replace

* [Fix] Address edge cases in _deserialize_df and add string dtype tests

- Guard against IndexError on empty DataFrames and all-null columns
- Use is not None instead of pd.isna() for Obs objects in auto_gamma
- Add tests for string dtype columns (with/without None, CSV and SQL)
- Add test for empty DataFrame deserialization

* [Fix] Avoid skipping NA-to-None conversion and guard auto_gamma against None lists

- Replace continue with conditional to preserve NA-to-None conversion for all-null columns
- Guard auto_gamma list lambda against None values to prevent TypeError
- Add tests for all-empty-string columns and Obs lists with None + auto_gamma
2026-03-29 18:46:15 +02:00
Justus Kuhlmann
9489b87a7e
fix nan to None test (#192) 2023-06-01 14:07:16 +01:00
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
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
03d70d3757 tests: missing assert added to pandas test. 2022-07-04 17:11:11 +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
f58ef11845 refactor: pandas serialize and deserialize removed from global
namespace.
2022-07-04 14:59:17 +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
a133030114 tests: additional tests for pandas csv import and export added. 2022-07-04 13:17:57 +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
c7c1725667 tests: pandas io tests extended. 2022-06-30 14:38:20 +01:00
Fabian Joswig
feab699162 tests: basic test for pandas DataFrame export and re-import added. 2022-06-30 14:27:10 +01:00