P
P
Python Newbie2021-12-22 08:47:59
Python
Python Newbie, 2021-12-22 08:47:59

How to create such a DataFrame in pandas python?

Hi I have a list of dictionaries and I need to create a pandas DataFrame from them.

One list item: And I want to get a DataFrame:{'date': date, 'text': text, 'user': user}

df = pd.DataFrame({
    'date': ['Все даты'],
    'text': ['все тексты'],
    'user': ['все юзеры']
})


Well, or easier, I want to write it in excel so that each line has a date, a test and a user

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2021-12-22
@Levman5

df = pd.DataFrame.from_records(<ваш список словарей>)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question