Skip to main content

SeriesIoExt

Trait SeriesIoExt 

Source
pub trait SeriesIoExt {
Show 31 methods // Required methods fn to_pickle(&self, path: &Path) -> Result<(), IoError>; fn to_pickle_file(&self, path: &Path) -> Result<(), IoError>; fn to_pickle_with_options( &self, path: &Path, options: &PickleWriteOptions, ) -> Result<(), IoError>; fn to_pickle_bytes(&self) -> Result<Vec<u8>, IoError>; fn to_pickle_bytes_with_options( &self, options: &PickleWriteOptions, ) -> Result<Vec<u8>, IoError>; fn to_csv_file(&self, path: &Path) -> Result<(), IoError>; fn to_csv_file_with_options( &self, path: &Path, options: &CsvWriteOptions, ) -> Result<(), IoError>; fn to_csv_string(&self) -> Result<String, IoError>; fn to_csv_string_with_options( &self, options: &CsvWriteOptions, ) -> Result<String, IoError>; fn to_markdown_string(&self) -> Result<String, IoError>; fn to_markdown_string_with_options( &self, options: &MarkdownWriteOptions, ) -> Result<String, IoError>; fn to_markdown_file(&self, path: &Path) -> Result<(), IoError>; fn to_markdown_file_with_options( &self, path: &Path, options: &MarkdownWriteOptions, ) -> Result<(), IoError>; fn to_latex_string(&self) -> Result<String, IoError>; fn to_latex_string_with_options( &self, options: &LatexWriteOptions, ) -> Result<String, IoError>; fn to_latex_file(&self, path: &Path) -> Result<(), IoError>; fn to_latex_file_with_options( &self, path: &Path, options: &LatexWriteOptions, ) -> Result<(), IoError>; fn to_json_file(&self, path: &Path, orient: &str) -> Result<(), IoError>; fn to_json_string(&self, orient: &str) -> Result<String, IoError>; fn to_hdf(&self, path: &Path) -> Result<(), IoError>; fn to_hdf_file(&self, path: &Path) -> Result<(), IoError>; fn to_hdf_key(&self, path: &Path, key: &str) -> Result<(), IoError>; fn to_hdf_with_options( &self, path: &Path, options: &HdfWriteOptions, ) -> Result<(), IoError>; fn to_excel(&self, path: &Path) -> Result<(), IoError>; fn to_excel_file(&self, path: &Path) -> Result<(), IoError>; fn to_excel_with_options( &self, path: &Path, options: &ExcelWriteOptions, ) -> Result<(), IoError>; fn to_excel_bytes(&self) -> Result<Vec<u8>, IoError>; fn to_excel_bytes_with_options( &self, options: &ExcelWriteOptions, ) -> Result<Vec<u8>, IoError>; fn to_sql<C: SqlConnection>( &self, conn: &C, table_name: &str, if_exists: SqlIfExists, ) -> Result<(), IoError>; fn to_sql_with_options<C: SqlConnection>( &self, conn: &C, table_name: &str, options: &SqlWriteOptions, ) -> Result<(), IoError>; fn to_clipboard(&self) -> Result<(), IoError>;
}
Expand description

Extension trait that adds IO convenience methods to Series.

Import this trait to call series.to_pickle(path), series.to_pickle_bytes(), series.to_hdf(path), series.to_csv_string(), series.to_markdown_string(), series.to_latex_string(), series.to_json_string("records"), series.to_hdf(path), series.to_excel(path), series.to_sql(conn, table, if_exists), or series.to_clipboard() directly on Series values.

Required Methods§

Source

fn to_pickle(&self, path: &Path) -> Result<(), IoError>

Write this Series to a Pickle file.

Matches pd.Series.to_pickle(path) for the supported FrankenPandas pickle envelope.

Source

fn to_pickle_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to a Pickle file.

Explicit file-suffixed form of SeriesIoExt::to_pickle.

Source

fn to_pickle_with_options( &self, path: &Path, options: &PickleWriteOptions, ) -> Result<(), IoError>

Write this Series to a Pickle file with explicit options.

Source

fn to_pickle_bytes(&self) -> Result<Vec<u8>, IoError>

Serialize this Series to Pickle bytes.

Source

fn to_pickle_bytes_with_options( &self, options: &PickleWriteOptions, ) -> Result<Vec<u8>, IoError>

Serialize this Series to Pickle bytes with explicit options.

Source

fn to_csv_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to a CSV file.

Matches pd.Series.to_csv(path) for the supported CSV writer surface, including pandas’ default index materialization.

Source

fn to_csv_file_with_options( &self, path: &Path, options: &CsvWriteOptions, ) -> Result<(), IoError>

Write this Series to a CSV file with explicit write options.

Source

fn to_csv_string(&self) -> Result<String, IoError>

Serialize this Series to a CSV string.

Matches pd.Series.to_csv() with no path for the supported writer surface.

Source

fn to_csv_string_with_options( &self, options: &CsvWriteOptions, ) -> Result<String, IoError>

Serialize this Series to a CSV string with explicit write options.

Source

fn to_markdown_string(&self) -> Result<String, IoError>

Serialize this Series to a Markdown table string.

Matches pd.Series.to_markdown() with no buffer for the supported table formatter surface.

Source

fn to_markdown_string_with_options( &self, options: &MarkdownWriteOptions, ) -> Result<String, IoError>

Serialize this Series to a Markdown table string with explicit options.

Source

fn to_markdown_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to a Markdown table file.

Uses a file-suffixed name to avoid colliding with Series::to_markdown(include_index, tablefmt).

Source

fn to_markdown_file_with_options( &self, path: &Path, options: &MarkdownWriteOptions, ) -> Result<(), IoError>

Write this Series to a Markdown table file with explicit options.

Source

fn to_latex_string(&self) -> Result<String, IoError>

Serialize this Series to a LaTeX tabular string.

Matches pd.Series.to_latex() with no buffer for the supported table formatter surface.

Source

fn to_latex_string_with_options( &self, options: &LatexWriteOptions, ) -> Result<String, IoError>

Serialize this Series to a LaTeX tabular string with explicit options.

Source

fn to_latex_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to a LaTeX tabular file.

Uses a file-suffixed name to avoid colliding with Series::to_latex(include_index).

Source

fn to_latex_file_with_options( &self, path: &Path, options: &LatexWriteOptions, ) -> Result<(), IoError>

Write this Series to a LaTeX tabular file with explicit options.

Source

fn to_json_file(&self, path: &Path, orient: &str) -> Result<(), IoError>

Write this Series to a JSON file.

Matches pd.Series.to_json(path, orient=...) for the supported Series JSON orientations.

Source

fn to_json_string(&self, orient: &str) -> Result<String, IoError>

Serialize this Series to a JSON string.

Matches pd.Series.to_json(orient=...) for the supported Series JSON orientations.

Source

fn to_hdf(&self, path: &Path) -> Result<(), IoError>

Write this Series to an HDF5 file at the default key.

Matches pd.Series.to_hdf(path) for the supported HDF5 snapshot surface.

Source

fn to_hdf_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to an HDF5 file at the default key.

Explicit file-suffixed form of SeriesIoExt::to_hdf.

Source

fn to_hdf_key(&self, path: &Path, key: &str) -> Result<(), IoError>

Write this Series to an HDF5 file at an explicit key.

Source

fn to_hdf_with_options( &self, path: &Path, options: &HdfWriteOptions, ) -> Result<(), IoError>

Write this Series to an HDF5 file with explicit options.

Source

fn to_excel(&self, path: &Path) -> Result<(), IoError>

Write this Series to an Excel file.

Matches pd.Series.to_excel(path) for the supported xlsx writer surface.

Source

fn to_excel_file(&self, path: &Path) -> Result<(), IoError>

Write this Series to an Excel file.

Explicit file-suffixed form of SeriesIoExt::to_excel.

Source

fn to_excel_with_options( &self, path: &Path, options: &ExcelWriteOptions, ) -> Result<(), IoError>

Write this Series to an Excel file with explicit options.

Source

fn to_excel_bytes(&self) -> Result<Vec<u8>, IoError>

Serialize this Series to xlsx bytes.

Source

fn to_excel_bytes_with_options( &self, options: &ExcelWriteOptions, ) -> Result<Vec<u8>, IoError>

Serialize this Series to xlsx bytes with explicit options.

Source

fn to_sql<C: SqlConnection>( &self, conn: &C, table_name: &str, if_exists: SqlIfExists, ) -> Result<(), IoError>

Write this Series to a SQL table.

Matches pd.Series.to_sql(name, con) for the supported SQL writer surface, including pandas’ default index materialization.

Source

fn to_sql_with_options<C: SqlConnection>( &self, conn: &C, table_name: &str, options: &SqlWriteOptions, ) -> Result<(), IoError>

Write this Series to a SQL table with pandas-style SQL write options.

Source

fn to_clipboard(&self) -> Result<(), IoError>

Reject-closed clipboard writer, matching pd.Series.to_clipboard() shape.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SeriesIoExt for Series

Source§

fn to_pickle(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_pickle_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_pickle_with_options( &self, path: &Path, options: &PickleWriteOptions, ) -> Result<(), IoError>

Source§

fn to_pickle_bytes(&self) -> Result<Vec<u8>, IoError>

Source§

fn to_pickle_bytes_with_options( &self, options: &PickleWriteOptions, ) -> Result<Vec<u8>, IoError>

Source§

fn to_csv_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_csv_file_with_options( &self, path: &Path, options: &CsvWriteOptions, ) -> Result<(), IoError>

Source§

fn to_csv_string(&self) -> Result<String, IoError>

Source§

fn to_csv_string_with_options( &self, options: &CsvWriteOptions, ) -> Result<String, IoError>

Source§

fn to_markdown_string(&self) -> Result<String, IoError>

Source§

fn to_markdown_string_with_options( &self, options: &MarkdownWriteOptions, ) -> Result<String, IoError>

Source§

fn to_markdown_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_markdown_file_with_options( &self, path: &Path, options: &MarkdownWriteOptions, ) -> Result<(), IoError>

Source§

fn to_latex_string(&self) -> Result<String, IoError>

Source§

fn to_latex_string_with_options( &self, options: &LatexWriteOptions, ) -> Result<String, IoError>

Source§

fn to_latex_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_latex_file_with_options( &self, path: &Path, options: &LatexWriteOptions, ) -> Result<(), IoError>

Source§

fn to_json_file(&self, path: &Path, orient: &str) -> Result<(), IoError>

Source§

fn to_json_string(&self, orient: &str) -> Result<String, IoError>

Source§

fn to_hdf(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_hdf_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_hdf_key(&self, path: &Path, key: &str) -> Result<(), IoError>

Source§

fn to_hdf_with_options( &self, path: &Path, options: &HdfWriteOptions, ) -> Result<(), IoError>

Source§

fn to_excel(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_excel_file(&self, path: &Path) -> Result<(), IoError>

Source§

fn to_excel_with_options( &self, path: &Path, options: &ExcelWriteOptions, ) -> Result<(), IoError>

Source§

fn to_excel_bytes(&self) -> Result<Vec<u8>, IoError>

Source§

fn to_excel_bytes_with_options( &self, options: &ExcelWriteOptions, ) -> Result<Vec<u8>, IoError>

Source§

fn to_sql<C: SqlConnection>( &self, conn: &C, table_name: &str, if_exists: SqlIfExists, ) -> Result<(), IoError>

Source§

fn to_sql_with_options<C: SqlConnection>( &self, conn: &C, table_name: &str, options: &SqlWriteOptions, ) -> Result<(), IoError>

Source§

fn to_clipboard(&self) -> Result<(), IoError>

Implementors§