Skip to content

Instantly share code, notes, and snippets.

@ravi07bec
Created October 29, 2020 06:35
Show Gist options
  • Save ravi07bec/895234bb445be606e88ddbdee2a75881 to your computer and use it in GitHub Desktop.
Save ravi07bec/895234bb445be606e88ddbdee2a75881 to your computer and use it in GitHub Desktop.
def embed_iframe(value):
print(value)
variant=value.split('\n')[0]
#print('https://www.youtube.com/watch?v=sh-MQboWJug')
df_final2=pd.read_csv('youtube_ids.csv')
print(df_final2)
df_final2['Variety']=df_final2['Variety'].str.upper()
a=df_final2[df_final2['Variety']==variant]['video_id'].values.tolist()[0]
#embed_url = 'http://www.youtube.com/watch?v='+str(a)
return html.Iframe(src=f'https://www.youtube.com/embed/'+str(a), width='910', height='320', )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment