Json to csv convert using python easily

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 22

  • @lingais
    @lingais 3 роки тому +5

    For those wondering how to remove empty rows, add newline="" to with open argument..
    Example:
    with open(fname, "w", newline="") as file:
    source: kite website

    • @ITTECHTARUN
      @ITTECHTARUN  3 роки тому +4

      with open(fname, "w") as file:
      csv_file = csv.writer(file,lineterminator='
      ')

  • @MrTcostabh
    @MrTcostabh 3 роки тому

    Thank you from Brazil! You helped me a lot!

  • @leelisa8243
    @leelisa8243 3 роки тому +1

    There's the error as follow, when i run this code:
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 451: illegal multibyte sequence.
    Please kindly help!

  • @PGhai
    @PGhai 2 роки тому

    Hey Tarun, thanks for uploading this great video, 1Question , how to remove black lines?

    • @ITTECHTARUN
      @ITTECHTARUN  2 роки тому

      Can u check the blog which I have mentioned in the description..also check the comments of this video..earlier I did how to remove

  • @gaston551
    @gaston551 3 роки тому

    I have problems the error is the following:
    sh-3.2# python3 csv.py
    Traceback (most recent call last):
    File "csv.py", line 3, in
    import csv
    File "/Users/edgasinc/Dropbox/SCRIPTS/EXPORT INFO COMPUTER/amp cisco/csv.py", line 10, in
    csv_file = csv.writer(file,lineterminator='
    ')
    AttributeError: partially initialized module 'csv' has no attribute 'writer' (most likely due to a circular import)
    sh-3.2#
    the problems, is one livery loss?

  • @hhbadarin
    @hhbadarin 3 роки тому

    Thank You!

  • @khaliphathiane584
    @khaliphathiane584 3 роки тому +1

    Thanks Man 🔥🔥

  • @shareeverywhere3996
    @shareeverywhere3996 Рік тому

    Error in result line

  • @rodhyun5286
    @rodhyun5286 2 роки тому

    I got an error TypeError: string indices must be integers

  • @poojanaik7064
    @poojanaik7064 4 роки тому

    Do we need pycharm add in for this

    • @ITTECHTARUN
      @ITTECHTARUN  4 роки тому

      No ..u can use any text editor / compiler...

    • @poojanaik7064
      @poojanaik7064 4 роки тому

      How can i remove empty rows?

    • @ITTECHTARUN
      @ITTECHTARUN  4 роки тому

      you can use lineterminator
      csv_file = csv.writer(file,lineterminator='
      ')
      I just updated it in my code, you can check here
      ittechtarun.blogspot.com/2019/12/json-to-csv-convert-using-python.html

  • @dillikar2662
    @dillikar2662 4 роки тому

    I want to remove empty rows also

  • @gavinsmyth6375
    @gavinsmyth6375 4 роки тому

    when I run the code I get this error raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    • @ITTECHTARUN
      @ITTECHTARUN  4 роки тому

      Did you copy code and sample json from my blog..?
      Just try, It probably indentation problem...if it doesnt work will share those files other way.

  • @rolandomora6665
    @rolandomora6665 4 роки тому

    NICE!!

  • @giovanniderosa7878
    @giovanniderosa7878 3 роки тому

    adesso puoi andare a ricostruire piscine in mezzo la natura

  • @giovanniderosa7878
    @giovanniderosa7878 3 роки тому

    ovviamente si scherza

  • @karolviolan2669
    @karolviolan2669 4 роки тому +1

    Thank you!