Zum Beispiel:
Code: Select all
polars_df.std()
col_1 (f64)
col_2 (f64)
20242.888632
0.0
Code: Select all
# now, the column with a standard deviation of 0 are to be excluded from the dataframe:
polars_df = polars_df.select(cs.numeric() != 0)
col_1 (bool)
col_2 (bool)
true
false
Dies identifiziert die richtigen Spalten, aber ich möchte, dass das Ergebnis ein Datenrahmen mit allen Spalten ist, bei denen die Standardabweichung größer als 0 ist. Was fehlt mir hier, um dorthin zu gelangen?
Mobile version