Detail: Series: Exporter

Overview: Series: Exporter

Series.to_frame(axis=1, *, index=None, index_constructor=None, columns=None, columns_constructor=None, name=<object object>)[source]

Return a Frame view of this Series. As underlying data is immutable, this is a no-copy operation.

Parameters:
  • axis – Axis 1 (default) creates a single-column Frame with the same index: axis 0 creates a single-row Frame with the index as columns.

  • *

  • index_constructor

  • columns_constructor

  • name

Returns:

Frame

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_frame()
<Frame>
<Index> 0       <int64>
<Index>
a       10
b       2
c       8
<<U1>   <int64>
Series.to_frame_go(axis=1, *, index=None, index_constructor=None, columns=None, columns_constructor=None, name=<object object>)[source]

Return FrameGO view of this Series. As underlying data is immutable, this is a no-copy operation.

Parameters:
  • axis

  • *

  • index_constructor

  • columns_constructor

Returns:

FrameGO

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_frame_go()
<FrameGO>
<IndexGO> 0       <int64>
<Index>
a         10
b         2
c         8
<<U1>     <int64>
Series.to_frame_he(axis=1, *, index=None, index_constructor=None, columns=None, columns_constructor=None, name=<object object>)[source]

Return FrameHE view of this Series. As underlying data is immutable, this is a no-copy operation.

Parameters:
  • axis

  • *

  • index_constructor

  • columns_constructor

Returns:

FrameHE

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_frame_he()
<FrameHE>
<Index>   0       <int64>
<Index>
a         10
b         2
c         8
<<U1>     <int64>
Series.to_html(config=None, style_config=<static_frame.core.style_config.StyleConfig object>)[source]

Return an HTML table representation of this Series using standard TABLE, TR, and TD tags. This is not a complete HTML page.

Parameters:

config – Optional DisplayConfig instance.

Returns:

str

Series.to_html_datatables(fp=None, show=True, config=None)[source]

Return a complete HTML representation of this Series using the DataTables JS library for table naviagation and search. The page links to CDNs for JS resources, and thus will not fully render without an internet connection.

Parameters:
  • fp – optional file path to write; if not provided, a temporary file will be created. Note: the caller is responsible for deleting this file.

  • show – if True, the file will be opened with a webbrowser.

  • config – Optional DisplayConfig instance.

Returns:

str, absolute file path to the file written.

Series.to_pairs()[source]

Return a tuple of tuples, where each inner tuple is a pair of index label, value.

Returns:

tp.Iterable[tp.Tuple[TLabel, tp.Any]]

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_pairs()
(('a', 10), ('b', 2), ('c', 8))
Series.to_pandas()[source]

Return a Pandas Series.

Returns:

pandas.Series

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_pandas()
a    10
b     2
c     8
dtype: int64
Series.to_series_he()[source]

Return a SeriesHE from this Series.

>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c'))
>>> s
<Series>
<Index>
a        10
b        2
c        8
<<U1>    <int64>
>>> s.to_series_he()
<SeriesHE>
<Index>
a          10
b          2
c          8
<<U1>      <int64>
Series.to_visidata()

Open an interactive VisiData session.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Fill Value | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic