[Python] How to do this in polars

Discussão em 'Python' iniciado por Stack, Fevereiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    pandas code, If a float column with 1.0, 2.0, 3.0, remove all the .0

    columns = pd_df.columns.difference(["date"])
    pd_df[columns] = pd_df[columns].map(lambda x: int(x) if x.is_integer() else x)

    Continue reading...

Compartilhe esta Página