robert
robert
SSolara
Created by robert on 9/21/2024 in #questions-issues
Highlight values in dataframe
Hello, I have a dataframe with a bunch of numbers and want to find extremes and show what is going on in these cases. To locate extremes I find useful to style dataframe by df.style.background_gradient and show by solara.display. However, with this I cannot attach cell actions. When using solara.DataFrame I can attach cell actions, but it does not work for styled dataframes. Is there any chance to combine both? The attempt is attached, but it does not work due the lack of pandas and seaborn Thank you https://py.cafe/snippet/solara/v1#c=H4sIAHqY7mYAA41SXWvbQBD8K-KeZFCEnWIKAkPpF30spbQPljEr3co6erq73q2SCOP_nj3JVghJcGw9aGdndmYXHUVtJYpCqM5ZT0mwGjyUpjRnwIGREBJ-nJzBgFBZbyIaTJhh03duiKBxcQIlG37LtTLBQY3pMlvFZ1Ea2XDLyfwrEHz30GGqjMSHDY29bSmgFLtJHZRJZ7ia4dqGEa47rjkDuxxa2jvQSIQpU3WPpcg4zb7uwG1--x6ZH2jQKPdjANnkY5lXUP87eNsbuT94kAoNpaOo7liSxF0-TYdhX17VMIETYZP8hAOmi4JJ_DtTpApOw5DOVguRCY__e-WxY2Xga1_OzB0aXLz_hHANzv1ReC-KBnTATKBU9M1ApZlFvEQm3ECtNaxxg5VK4s3dMr9d5ysWs6_tSRRHcYc-qMi6ZXNr6ZflkceLm-cqE3WrtPTIpO3cIagCEjfvlaRWFKv1MhOdMn-n8sNU_cB47qlUkmWN0viZpwb0X6whUAb9Gw6RelNNXKY4iHOFOO1O2csUb0R80vG5cjc8V79ju-sbnRNe2-ayyOvx2_PU1cf1ezwJPcOgr5leeNE1_k_ZeFX-sra70yOTltHF0wMAAA
4 replies
SSolara
Created by robert on 8/31/2024 in #questions-issues
How to cancel task?
Hello, I tried to cancel tasks which are not current and tried the following code. My expectation was, that the task will wait until the previous task is finished and if it is not current anymore, then it is canceled (From the docs: The task object will execute the function only once per virtual kernel and will only store one result per virtual kernel. When called multiple times, the previously started thread or asyncio task result will be ignored.) So my expectation was, that if I click 10-times the button when running the task for the first time, some of the tasks will be canceled and the total number of runs will be smaller than the number of clicks. What I am doing wrong? The code is shared as gist, since it does not run in pycafe, (however it works fine on local PC) and the URL generated by pycafe is too long https://gist.github.com/robert-marik/f41782f83e361636677099808cf1621a . Thank you.
3 replies
SSolara
Created by robert on 8/29/2024 in #questions-issues
Hide AppBar
Hello, I have multipage solara. However, the AppBar (title and menus) takes a lot of space on small monitor. Is it possible to make AppBar not fixed on the top of the screen? Thank you.
3 replies