ãããã®ã¡ã½ããã使ç¨ãããã¨ã§ããã¼ã¿ãã¬ã¼ã ã®åã«å¯¾ãã¦.when()ã§å®ç¾©ããæ¡ä»¶ã«å¾ã£ã¦ãã¼ã¿ã®æä½ãè¡ãã¾ãããã¨ãã°ä»¥ä¸ã®ãµã³ãã«ã¹ã¯ãªããã§ã¯ã楽å¨åã¨æ¼å¥è æ°ã®ãã¼ã¿ãã¬ã¼ã ã«å¯¾ãã¦æ¡ä»¶ã«ãããGroupãåã追å ãã¦ãã¾ãã example03.pyï¼.when()ã§æå®ãããæ¡ä»¶ã§æ°ããªåã追å ãããµã³ãã« import polars as pl # ãµã³ãã«ãã¼ã¿ãã¬ã¼ã ã楽å¨åã¨æ¼å¥è æ°ã§ä½æ df = pl.DataFrame( { "Instruments": ["Violin", "Trombone", "Flute", "Cello", "Trumpet"], "Players": [5, 1, 3, 2, 1], } ) # æ°ããå 'Group' ãæ¡ä»¶ã«åºã¥ãã¦ä½æ df = df.with_columns( pl.when(pl.col("Play
{{#tags}}- {{label}}
{{/tags}}