0

I just copy-pasted this code block which I want to use on my script but this throwing red mark by pylance saying "(" "[" "{" was not closed, but I cannot find where I missed those, everything looks perfect for me

for idx, sentence in enumerate(sentences):
text = sentence['text'].lower()

sentence['audio'].export('books/audio_output/sample-'+str(idx)+'.mp3', format="mp3")

temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+'.mp3",'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':','duration':'}], columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)

1 Answers1

0
temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+".mp3",
                         'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':'','duration':''}],
                       columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)
DataSciRookie
  • 798
  • 1
  • 3
  • 12