mito icon indicating copy to clipboard operation
mito copied to clipboard

Unable to change the data type on multi-select columns

Open twelsh37 opened this issue 2 years ago • 3 comments

Describe the bug If you select multiple columns and you want to assign them all the same dtype the dtype is only assigned to the last column selected.

To Reproduce Steps to reproduce the behavior:

  1. Select multiple columns
  2. In the taskpane change the type to an int or whatever
  3. Note that only the last of the selected columns have its type changed

This happens no matter what dataset you are using. I was trying to change 20 str's to int's In the end I had to complete the action 20 times instead of selecting the 20 columns and carrying out the action once.

Expected behavior Select multiple columns and in the task pane change all the columns to the same dtype

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10 Pro, Version 21H1, Build: 19043.1526
  • Browser Chrome Version 98.0.4758.82 (Official Build) (64-bit)
  • Mito Version 0.3.170

twelsh37 avatar Feb 18 '22 18:02 twelsh37

Sweet! This is something that is on our radar but we haven't put a ton of thought into. To get this working properly, I think we need to extend the notion of the column control panel to support multiple columns.

@aarondr77 any thoughts on how we might approach this? Would be nice to think of all the features we have in there, and how they might extend to multiple columns...

naterush avatar Feb 18 '22 18:02 naterush

I think there are a two approaches we could take to this. Potentially doing both:

Create a dataframe version of the column control panel.

It might include:

  • multi column dtype change
  • multi column fillNaN
  • multi column format
  • some summary stat information like: number of missing values per column in the sheet, distribution of values, etc.
  • the ability to rename columns
  • the ability to set column formulas
  • multi column sort
  • multi column filter This approach is a bigger design lift that we'd want to take our time on and think about where it should live. Because of the amount of functionality it could support, we've previously ideated that this could be a separate panel that opens above the Mitosheet. As you edited your dataset, this panel dataframe view would update and be another point of feedback and control.

Add a toolbar button that works with multi select

Continue the flow of letting users multi select columns in the sheet and then edit them all at once via a toolbar button. This is how we support deleting and formatting. It would make sense to multi select and then change the dtype all at once. Notably, this is the approach that @twelsh37 attempted. This approach continues to work as one off solutions, but doesn't address the overall problem with bulk editing. The bulk of the design work here is what to do with the toolbar that is filling up.

Since this quickly becomes a bigger design question, let's create a formal specification for this before implementing.

aarondr77 avatar Feb 21 '22 17:02 aarondr77

+1 a pro user just requested this feature

aarondr77 avatar Mar 11 '22 21:03 aarondr77