You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a tksheet with a drop down on 4th column. The data on this column is from a dataframe 'df' and can be empty or non-empty.
The column should display 1, 2, 3 as choices in a drop down. However the column should also display the value from the dataframe as it's default value .
How do I display the 'df' value for each row? The syntax I have in my mind is:
sheet.create_dropdown(r = "all", c = 4, text = df.loc[row]['column_name'], values = ['1', '2', '3'])
But, how do I fetch row index for each cell , in the example below? Is there any variable that holds this value?
sheet.create_dropdown(r = "all", c = 4, text = df.loc[?????]['column_name'], values = ['1', '2', '3'])
The text was updated successfully, but these errors were encountered:
If you're NOT concerned about a user being able to insert rows using right click and inserted rows creating cells in column 4 which do not have a drop down you can do (let me know if it doesn't work)
If you are conerned about cells being added to column 4 which don't have a drop down when a user right click inserts rows (if they're able to) then this is a bit of a tricky problem at the moment and one that I'm not sure I have a solution for sorry but I will get back to you if I find or create one
I have a tksheet with a drop down on 4th column. The data on this column is from a dataframe 'df' and can be empty or non-empty.
The column should display 1, 2, 3 as choices in a drop down. However the column should also display the value from the dataframe as it's default value .
How do I display the 'df' value for each row? The syntax I have in my mind is:
sheet.create_dropdown(r = "all", c = 4, text = df.loc[row]['column_name'], values = ['1', '2', '3'])
But, how do I fetch row index for each cell , in the example below? Is there any variable that holds this value?
sheet.create_dropdown(r = "all", c = 4, text = df.loc[?????]['column_name'], values = ['1', '2', '3'])
The text was updated successfully, but these errors were encountered: