I am trying to run this example bit of code
import pandas as pd
import numpy as np
np.random.seed(24)
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
df = pd.concat([df, pd.DataFrame(np.random.randn(10, 4), columns=list('BCDE'))],
axis=1)
df.iloc[0, 2] = np.nan
df.style.background_gradient(cmap='summer_r')
If I run it on Google Colab and it produces the expected colour coded table but when I run it on Spyder, which I have running through a Conda environment, with pandas
and numpy
packages installed it doesn't show any table.
Any ideas what the issue might be?