A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/9850 below:

SparseSeries.to_frame and SparseDataFrame.to_panel result in dense structures · Issue #9850 · pandas-dev/pandas · GitHub

import pandas as pd

ss = pd.SparseSeries([1, 0, 1])
type(ss.to_frame())
# <class 'pandas.core.frame.DataFrame'>

index = pd.MultiIndex.from_tuples([(0, 0), (0, 1), (1, 1)])
sdf = pd.SparseDataFrame([[1, 0, 1], [0, 0, 0], [1, 0, 0]], index=index)
type(sdf.to_panel())
# <class 'pandas.core.panel.Panel'>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4