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

CSV load options dialog #495

Closed
juanfcocontreras opened this issue May 23, 2021 · 6 comments
Closed

CSV load options dialog #495

juanfcocontreras opened this issue May 23, 2021 · 6 comments

Comments

@juanfcocontreras
Copy link

Lately I use a lot the option to launch dtale from the cli. However, while it works perfectly for excel files, it is not always the same for csv files.

The problem with csv files is that there are multiple variants, so sometimes they have different separators, or do not include headers.

Would it be possible to include a dialog after dragging a csv file to dtale to open it, where you can select whether it has a header, and the selection of the separator, and a preview of the first lines to help you choose the options?

Thanks in advance!

@aschonfeld
Copy link
Collaborator

Of course! I meant to add additional options for CSV parsing, but never got around to it. I like this idea of having an intermediary popup which you can either click past or change the values.

@aschonfeld
Copy link
Collaborator

@juanfcocontreras here's what I got so far. You'll have to let me know of any other options to add (also I still need to find a way to add these options to the URL-style CSV loading & I need to update the TSV file drops)

Screen.Recording.2021-05-29.at.12.10.08.PM.mov

@juanfcocontreras
Copy link
Author

I see it as perfect for the moment. I can think of some possible improvements:

  • a small preview of the first lines of the file in that same window, so you don't have to open the file externally and check if it has a header or not, and the same to find out the separator
  • instead of writing the separator, to offer a drop-down with the most common ones (whitespace , ; \t), but giving the option of being able to write another one
  • and this I think is more complex and less necessary, the option to reload the same file with other options, as Excel allows, so that if you have made a mistake in this screen you do not have to drag the file again.

I don't know what you think about them.

Thank you very much!

@aschonfeld
Copy link
Collaborator

So I added a dropdown with the following options (comma, tab, colon, pipe & custom) and when "custom" is selected there will be text input displayed as you saw in the demo I posted earlier.

As for the other two options I'll probably leave those down the line for version 2.0 of this functionality. That being said, I'm not really sure how you're 3rd request will be possible without storing the unparsed version of the code somewhere in memory which seems horribly inefficient.

@juanfcocontreras
Copy link
Author

juanfcocontreras commented May 29, 2021

So I added a dropdown with the following options (comma, tab, colon, pipe & custom) and when "custom" is selected there will be text input displayed as you saw in the demo I posted earlier.

This is perfect, thank you!

As for the other two options I'll probably leave those down the line for version 2.0 of this functionality. That being said, I'm not really sure how you're 3rd request will be possible without storing the unparsed version of the code somewhere in memory which seems horribly inefficient.

I understand that, and honestly, the third option I think is too complex for the number of times it would be used.

Nevertheless, I think the first one, preview the first lines of the CSV file in that same dialog, is much more useful and will be used much more.

Thanks for everything!

aschonfeld added a commit that referenced this issue May 31, 2021
  * #509: resizable side panel width
  * #495: CSV loading dialog
  * height of "Exponential Smoothing" in column builders
  * code snippet fixes
  * cleaner updates
aschonfeld added a commit that referenced this issue Jun 1, 2021
  * #509: resizable side panel width
  * #495: CSV loading dialog
  * height of "Exponential Smoothing" in column builders
  * code snippet fixes
  * cleaner updates
@aschonfeld
Copy link
Collaborator

added in v1.49.0

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

No branches or pull requests

2 participants