I'd like to read the Python array and use WordCloud, so please tell me how to read the array.

Asked 2 years ago, Updated 2 years ago, 38 views

If you access the url address, you'll see words and word counts.

I want to read this from Python and make Word Cloud Even if you search the Internet, there is a way to create a word cloud by opening a string file and counting the number of words There is no way to make a word cloud by reading files organized by counting the number of words. Please let me know.

python array

2022-09-20 21:50

1 Answers

After receiving the string, convert it to the list as shown below.

l = "[['aaa', 1], ['bbb', 2]]"
L = eval(l)
L
[['aaa', 1], ['bbb', 2]]


2022-09-20 21:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.