I have a pandas
dataframe that looks like this:
import pandas as pd
foo = pd.DataFrame({'temp': ['message1', 'message2', 'message3'], 'var2': [1,2,3], 'col3':[4,5,6]})
I also have the following dictionary
foo_dict = {'message1' : 'i am message 1', 'message2': 'i am foo', 'message3': 'i am lala', 'var2' : ' another random message', 'col3': 'more random messages'}
I would like to style this pandas dataframe, so that whenever I hover over an element of the dataframe, if this element (can be either a cell, or a column) exists in the foo_dict.keys()
, i would like the respective foo_dict.value()
to be annotated
Is it possible in pandas ?