You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to export pdb data with ATOM and OTHERS entries using .to_pdb_stream I always get a pandas.errors.IntCastingNaNError (cf. Steps/Code to Reproduce).
As I need to maintain the TER markers in the resulting pdb data, the content of the OTHERS frame is necessary.
When writing directly to a pdb file with .to_pdb there is no such issue. A possible approach in fixing could be an abstract base function for both methods or to specify the desired output (i.e. file or stream) in to_pdb as mentioned in #108
which is executed on the entire concatenated DataFrame.
As the OTHERS frame doesn't contain residue number entries, these cells are always NaN after concatenating.
* include testing on newer python versions
* bump version string
* linting: remove print statements from tests
* fix: improve robustness of and add a test #141
* fix: add init to test data module
* fix: add init to remaining test data modules
* tests: add tests with github actions
* tests: add tests with github actions
* tests: rename build job
* update changelog
---------
Co-authored-by: Arian Jamasb <[email protected]>
Describe the bug
When trying to export pdb data with ATOM and OTHERS entries using
.to_pdb_stream
I always get apandas.errors.IntCastingNaNError
(cf. Steps/Code to Reproduce).As I need to maintain the TER markers in the resulting pdb data, the content of the OTHERS frame is necessary.
When writing directly to a pdb file with
.to_pdb
there is no such issue. A possible approach in fixing could be an abstract base function for both methods or to specify the desired output (i.e. file or stream) into_pdb
as mentioned in #108Steps/Code to Reproduce
Example:
Expected Results
Stream containing the specified records in pdb format.
Actual Results
A
pandas.errors.IntCastingNaNError
stemming from Line 909 in pandas_pdb.pywhich is executed on the entire concatenated DataFrame.
As the OTHERS frame doesn't contain residue number entries, these cells are always NaN after concatenating.
Versions
The text was updated successfully, but these errors were encountered: