You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
import pandas as pd
df = pd.DataFrame(np.arange(15).reshape(5,3), index=list('abcde'))
df.loc['b',1] = np.nan # for good measure...
sparse = df.to_sparse()
sparse[1] # This is OK.
df.loc['b'] # This is also OK.
sparse.loc['b'] # This blows up