word_freqs = []
word_freqs.append(word_freqs_0)
word_freqs.append(word_freqs_1)
word_freqs.append(word_freqs_2)
word_freqs.append(word_freqs_3)
word_freqs.append(word_freqs_4)
word_freqs.append(word_freqs_5)
word_freqs.append(word_freqs_6)
word_freqs.append(word_freqs_7)
word_freqs.append(word_freqs_8)
I'd like to make the above source into a repeat statement. There are data frames from word_freeqs_0 to word_freeqs_8 and I want to append in word_freeqs What should I do?
python pandas
for i in range(9):
df = pd.DataFrame()
word_freqs.append(df)
I think you can do it like this. If you're going to use a repetitive sentence, it seems better to use the variable name uniformly
© 2024 OneMinuteCode. All rights reserved.