How to change datatype of a column/series in pandas (Python)

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 5

  • @KraivKris
    @KraivKris 3 года назад

    Hi. Thank you for the tutorial, but i have a question ¿How can you save permanently that change?

    • @TechMoney33
      @TechMoney33  3 года назад

      Hi,
      The change takes place immediately. In order to revert back, you need to change the datatype again. Thanks

    • @kraivprob4529
      @kraivprob4529 3 года назад

      @@TechMoney33 once I save the dtype changes in a new csv, when I read that new csv doesnt preserve the changes.

    • @TechMoney33
      @TechMoney33  3 года назад

      @@kraivprob4529 For that one you can change the datatype while you are importing dataset into python. You have the option to specify datatypes for columns with read csv. Thanks

  • @ankitadey3267
    @ankitadey3267 9 месяцев назад

    But it is showing value error to me