jupyter_io.v0 module#
- savefig_in_notebook(fig: Figure | None = None, filename: Path | str = 'figure.pdf', **kwargs: Any) None [source]#
Save matplotlib figure in a notebook as a file.
Warning
This function is deprecated and will be removed in a future release. Use
jupyter_io.in_notebook
instead like:fig.savefig(in_notebook(filename))
- Parameters:
fig (Figure | None) – Matplotlib
Figure
object to be saved.filename (Path | str) – Filename with explicit extension (e.g.,
figure.pdf
).**kwargs (Any) – Arguments to be passed to matplotlib
savefig()
.
- Return type:
None
- savefile_in_notebook(f: TextIO, filename: Path | str, encoding: str = 'utf-8') None [source]#
- savefile_in_notebook(f: BinaryIO, filename: Path | str) None
Save file object (I/O object) in a notebook as a file.
Warning
This function is deprecated and will be removed in a future release. Use
jupyter_io.in_notebook
instead like:with open(in_notebook(filename), 'w') as g: g.write(f.read())
- Parameters:
f – File object (I/O object) to be saved.
filename – Filename of the saved file.
encoding – Text encoding. It is only used if
io
is a text IO.
- savetable_in_notebook(table: DataFrame | Series[Any], filename: Path | str = 'table.csv', **kwargs: Any) None [source]#
Save pandas DataFrame or Series in a notebook as a file.
Warning
This function is deprecated and will be removed in a future release. Use
jupyter_io.in_notebook
instead like:table.to_csv(in_notebook(filename))
- Parameters:
table (DataFrame | Series[Any]) – pandas
DataFrame
ofSeries object
to be saved.filename (Path | str) – Filename with explicit extension (e.g.,
table.csv
).**kwargs (Any) – Arguments to be passed to
table.to_<extension>()
.
- Return type:
None