Python Forum
parse json field from csv file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
parse json field from csv file
#1
Hello,

I want to get from csv file a column contain string json, so i use theses command:
fichier_complet=pd.read_csv("outputfile.csv", sep = ',',dtype='unicode',usecols = ['body'],keep_default_na=False)

print(fichier_complet.values[0])
json_string = json.dumps(fichier_complet.values[0])


The print display string with [' and '] at the beginning and end of value of cell csv file.

I want to get a json object which i can get a value from a different key.

How can i do that please ?
Thank you.

Attached Files

Thumbnail(s)
   
Reply


Messages In This Thread
parse json field from csv file - by lebossejames - Nov-14-2023, 10:29 AM
RE: parse json field from csv file - by buran - Nov-14-2023, 11:16 AM
RE: parse json field from csv file - by Pedroski55 - Nov-14-2023, 10:06 PM
RE: parse json field from csv file - by snippsat - Nov-14-2023, 11:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  encrypt data in json file help jacksfrustration 1 489 Mar-28-2024, 05:16 PM
Last Post: deanhystad
  parse/read from file seperated by dots giovanne 5 1,288 Jun-26-2023, 12:26 PM
Last Post: DeaD_EyE
  Python Script to convert Json to CSV file chvsnarayana 8 2,823 Apr-26-2023, 10:31 PM
Last Post: DeaD_EyE
  Loop through json file and reset values [SOLVED] AlphaInc 2 2,459 Apr-06-2023, 11:15 AM
Last Post: AlphaInc
  [split] Parse Nested JSON String in Python mmm07 4 1,714 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Converting a json file to a dataframe with rows and columns eyavuz21 13 5,341 Jan-29-2023, 03:59 PM
Last Post: eyavuz21
  validate large json file with millions of records in batches herobpv 3 1,415 Dec-10-2022, 10:36 PM
Last Post: bowlofred
  Writing to json file ebolisa 1 1,111 Jul-17-2022, 04:51 PM
Last Post: deanhystad
  Trying to parse only 3 key values from json file cubangt 8 3,838 Jul-16-2022, 02:05 PM
Last Post: deanhystad
  Initializing, reading and updating a large JSON file medatib531 0 1,906 Mar-10-2022, 07:58 PM
Last Post: medatib531

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020