Coverage for /home/runner/work/hotelling/hotelling/hotelling/helpers.py : 71%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""helpers.py."""
except ImportError: dd = False
"""savefig.
Allows displaying a matplotlib figure to the console terminal. This requires `pysixel` to be pip installed. It also requires a terminal with `Sixel graphic` support, like `DEC` with graphic support, Linux `xterm` (started with -ti 340), MLTerm (multilingual terminal, available on Windows, Linux etc).
This is called by the command line tool when using --output stdout and can also be used in an ipython session.
:param plt: matplotlib pyplot :return: """ buf = BytesIO() plt.savefig(buf) buf.seek(0) if sixel is None: warn("No sixel module available. Please install pysixel") writer = sixel.SixelWriter() writer.draw(buf)
"""load_df.
:param str filepath: :param str server: head node for distributed cluster, ip address and port or hostname and port (localhost for local) :param bool dask: if True, forces the use of dask,, even on smaller datasets :param kwargs: to pass arguments to pandas `read_csv`
:return: dataframe """ large = True else: except (OSError, FileNotFoundError): # doesn't exist, or is distributed. filesize = 0 large = True
# for dask, we set index a different way, not in read_csv itself
else: client = Client(server) # distributed, head node else: else: |