Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding check process to alignment at apply pars time #422

Merged
merged 7 commits into from
Apr 21, 2023

Conversation

briochh
Copy link
Collaborator

@briochh briochh commented Apr 19, 2023

Adding additional data store during add pars and checking against as apply pars time.

Hopefully should catch misalignment ofindex_cols when applying pars.

Caveat: might cause unexpected failures... may need refining.

jtwhite79 and others added 7 commits April 6, 2023 14:21
fix for line_terminator

set indexer fix

removed moouu tests

starting to fix applys with np functions ugh

more apply ufunc fixes

more apply ufunc fixes

more apply ufunc fixes

more pandas bs

more fixes

ugh

more

more fixes

more

more

less reals for py3.9 mem issue
Looks like issues are less related to the use of ufunc (e.g. np.log10) on Object type series
(which has be deprecated since before Pandas 1.5) but rather related to assignments with
`df.loc[:,col] = RHS` casting RHS into the dtype of `df[col]` and, therefore,
when RHS is expected to update the series dtype (e.g. to float or int [using apply()
or astype()]) the action does nothing. Conversion of pst data cols was not occuring as expected
and subsequent ufunc calls (e.g. log10) were failing.
A big WTF but seems to work if the assignment is of the form `df[col]=RHS`.

Have stripped back most of JTW mods after making this change in pst_handler.py
@briochh briochh requested a review from jtwhite79 April 19, 2023 07:18
@coveralls
Copy link

Coverage Status

Coverage: 79.751% (+0.3%) from 79.473% when pulling 14b9cc6 on briochh:feat_chkmultalign into cb10a84 on pypest:develop.

Copy link
Collaborator

@jtwhite79 jtwhite79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I think having this check will help identify bugs sooner...

@@ -968,7 +968,7 @@ def _par_prep(
sep = " "
if rel_filepath.suffix.lower() == ".csv":
sep = ","
if df.columns.is_integer():
if pd.api.types.is_integer_dtype(df.columns): # df.columns.is_integer(): # really!???
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vile ey?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@briochh briochh merged commit 9f0edbd into pypest:develop Apr 21, 2023
@briochh briochh deleted the feat_chkmultalign branch July 24, 2023 23:44
@briochh briochh restored the feat_chkmultalign branch July 24, 2023 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants