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

Could starting frames use 'nan' instead of '-' #154

Open
asgibson opened this issue Sep 11, 2024 · 1 comment
Open

Could starting frames use 'nan' instead of '-' #154

asgibson opened this issue Sep 11, 2024 · 1 comment
Labels
convention Repository coding and documentation standards help wanted Extra attention is needed question Further information is requested

Comments

@asgibson
Copy link
Contributor

A starting frame of data is filled with '-' in place of all values. As data comes in they are replaced with the value for that specific data point; however, this means we are mixing strings and floats in our data frame. We could instead use float('nan') as our initial values. Would that be appropriate without causing errors?

@asgibson asgibson added help wanted Extra attention is needed question Further information is requested convention Repository coding and documentation standards labels Sep 11, 2024
@dragonejt
Copy link
Contributor

I think this is a good argument to move towards using numpy arrays for frames everywhere instead of Python lists. Simple numpy arrays can are of a single type and precision, and we can use the special value np.nan. This would require a bit more work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
convention Repository coding and documentation standards help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants