mito icon indicating copy to clipboard operation
mito copied to clipboard

Unable to filter on function columns when duplicating a sheet

Open plasmonresonator opened this issue 2 years ago • 2 comments

Describe the bug When I create a formula column in a sheet and then duplicate that sheet, on the new sheet, I am not able to filter on that formula column.

To Reproduce import example data file attached and perform the following actions

from mitosheet import *; register_analysis('UUID-dd867de1-367b-4797-9425-54aee56e4f28')

  1. Imported deleteme.xlsx import pandas as pd sheet_df_dictonary = pd.read_excel('deleteme.xlsx', engine='openpyxl', sheet_name=['Sheet1', 'Sheet2'], skiprows=0) Sheet1 = sheet_df_dictonary['Sheet1'] Sheet2 = sheet_df_dictonary['Sheet2']

  2. Added column new-column-e7gz to Sheet1 Sheet1.insert(2, 'new-column-e7gz', 0)

  3. Renamed new-column-e7gz to iseven in Sheet1 Sheet1.rename(columns={'new-column-e7gz': 'iseven'}, inplace=True)

  4. Set new-column-e7gz in Sheet1 to =if(Value1%2==0,True,False) Sheet1['iseven'] = IF(Sheet1['Value1']%2==0,True,False)

  5. Duplicated Sheet1 to Sheet1_copy Sheet1_copy = Sheet1.copy(deep=True)

on the duplicated sheet, try to filter on the 'iseven' column

Expected behavior I should be able to filter (or view summary stats, etc.) for all columns.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Mito Version: 0.1.393 deleteme.xlsx

plasmonresonator avatar Mar 20 '22 15:03 plasmonresonator

@plasmonresonator thanks for the bug report! We knew there was some wacky-ness with filtering and duplicating, but this is wackier than I expected.

Can you currently filter on the first sheet? Or is the filter broken on both of them? If it's not broken on the first, then this is def a new bug - and I'll hop on it ASAP!

naterush avatar Mar 21 '22 22:03 naterush

No problem! It does work on the first sheet still, just not the duplicated sheet.

plasmonresonator avatar Mar 21 '22 22:03 plasmonresonator