Returns True if x is an iterable which can be transformed into a pandas Series, False for the other types of possible values of a `hover_data` dict. A tuple of length 2 is a special case corresponding to a (format, data) tuple.
(x)
| 1168 | |
| 1169 | |
| 1170 | def _isinstance_listlike(x): |
| 1171 | """Returns True if x is an iterable which can be transformed into a pandas Series, |
| 1172 | False for the other types of possible values of a `hover_data` dict. |
| 1173 | A tuple of length 2 is a special case corresponding to a (format, data) tuple. |
| 1174 | """ |
| 1175 | if ( |
| 1176 | isinstance(x, str) |
| 1177 | or (isinstance(x, tuple) and len(x) == 2) |
| 1178 | or isinstance(x, bool) |
| 1179 | or x is None |
| 1180 | ): |
| 1181 | return False |
| 1182 | else: |
| 1183 | return True |
| 1184 | |
| 1185 | |
| 1186 | def _escape_col_name(columns, col_name, extra): |
no outgoing calls
no test coverage detected