File: extras.py

package info (click to toggle)
python-influxdb-client 1.40.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,216 kB
  • sloc: python: 60,236; sh: 64; makefile: 53
file content (13 lines) | stat: -rw-r--r-- 396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Extras to selectively import Pandas or NumPy."""

try:
    import pandas as pd
except ModuleNotFoundError as err:
    raise ImportError(f"`query_data_frame` requires Pandas which couldn't be imported due: {err}")

try:
    import numpy as np
except ModuleNotFoundError as err:
    raise ImportError(f"`data_frame` requires numpy which couldn't be imported due: {err}")

__all__ = ['pd', 'np']