Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dict table
#3
(Sep-30-2023, 11:06 AM)Pedroski55 Wrote: Don't worry about your English, it is good enough!

What is JA3?

Pandas can read a dictionary. What is the problem?

import pandas as pd

data = {'id': [1, 2, 3], 
        'name': ['Alice', 'Bob', 'Charlie'],
        'info': [{'age': 25, 'gender': 'female'},
                 {'age': 30, 'gender': 'male', 'location': 'New York'},
                 {'age': 35, 'gender': 'male', 'location': 'San Francisco'}]}
df = pd.DataFrame(data)
print(df)
Look here.
thank you for your reply, turn out it need an external package like Panda
can I add data later, but only a part of it, for example
-name Alice, 'location': 'Florida'
-name Alice, 'address': 'Abraham street'
i need the syntax
Reply


Messages In This Thread
dict table - by kucingkembar - Sep-30-2023, 10:49 AM
RE: dict table - by Pedroski55 - Sep-30-2023, 11:06 AM
RE: dict table - by kucingkembar - Sep-30-2023, 11:16 AM
RE: dict table - by Pedroski55 - Sep-30-2023, 03:18 PM
RE: dict table - by deanhystad - Sep-30-2023, 03:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sort a dict in dict cherry_cherry 4 80,559 Apr-08-2020, 12:25 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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