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

after allowing characters in the data section, df() function was retu… #249

Merged
merged 1 commit into from Sep 14, 2018

Conversation

krzysztof-slowinski
Copy link

…rning DataFrame with columns of dtype object for all columns if there are characters in the data section - this is a fix by attempting to convert the columns to float64 if they only contain numerical data

…rning DataFrame with columns of dtype object for all columns if there are characters in the data section - this is a fix by attempting to convert the columns to float64 if they only contain numerical data
@kinverarity1
Copy link
Owner

kinverarity1 commented Jul 13, 2018 via email

@krzysztof-slowinski
Copy link
Author

It is worth to mention that I tried to do the fix in las.py#set_data where the curve.data is assigned (currently at line 623), but fixing it at that location did not result in the change of type in the DataFrame returned through df() due to the way this DataFrame is constructed. If possible, it would be worth to fix it at the origin, which las.py#set_data seems to be, but it would require some additional changes.

@kinverarity1
Copy link
Owner

OK I see what you mean. It'll be a bit messy but I'll add some code in LASFile.set_data_from_df to try and convert each DataFrame column to floats if possible. In addition to your commit.

Thanks!

@kinverarity1 kinverarity1 mentioned this pull request Sep 14, 2018
@kinverarity1
Copy link
Owner

I'll merge this now and work on what I mentioned when possible. Cheers.

@kinverarity1 kinverarity1 merged commit 1d36ae3 into kinverarity1:master Sep 14, 2018
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.

None yet

2 participants