Detail: TypeClinic: Display

Overview: TypeClinic: Display

TypeClinic.__repr__()[source]

Return a compact string representation of the type hint (the type and/or generic aliases necessary) to represent the object given at initialization.

>>> f = sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x')
>>> f
<Frame: x>
<Index>    a       b      c               <<U1>
<Index>
0          10      False  1517-01-01
1          2       True   1517-04-01
2          8       True   1517-12-31
3          3       False  1517-06-30
<int64>    <int64> <bool> <datetime64[D]>
>>> tc = sf.TypeClinic((f, True))
>>> tc
tuple[Frame[Index[int64], Index[str_], int64, bool_, datetime64], bool]
TypeClinic.__str__()

Return str(self).

>>> f = sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x')
>>> f
<Frame: x>
<Index>    a       b      c               <<U1>
<Index>
0          10      False  1517-01-01
1          2       True   1517-04-01
2          8       True   1517-12-31
3          3       False  1517-06-30
<int64>    <int64> <bool> <datetime64[D]>
>>> tc = sf.TypeClinic((f, True))
>>> tc
tuple[Frame[Index[int64], Index[str_], int64, bool_, datetime64], bool]

TypeClinic: Constructor | Exporter | Method | Display