问题
I have the path of images inside the pandas dataframe I need to get the images inside the dataframe if I have path of it is it possible inside the dataframe? I need to store the images in the dataframe column along with their path. This is how I have tried it but its not working. Also the image size is small its 50x50
from IPython.core.display import HTML
image=df['profile']
def path_to_image_html(path):
return '<img src="'+ path + '" style=height:50px;"/>'
a=HTML(df.to_html(escape=False ,formatters=dict(image=image)))
These are the path of images inside the dataframe column
http://pbs.twimg.com/profile_images/797804071063343105/KPytXWtY_normal.jpg
http://pbs.twimg.com/profile_images/903374198009188353/pDuYl5Uk_normal.jpg
http://pbs.twimg.com/profile_images/1101088756432396290/5bzisDRx_normal.png
来源:https://stackoverflow.com/questions/55928446/how-to-get-the-image-if-we-have-path-in-pandas-dataframe