* Overrides default toString implementation. This essentially makes `print()` works.
()
| 1977 | * Overrides default toString implementation. This essentially makes `print()` works. |
| 1978 | */ |
| 1979 | toString(): string { |
| 1980 | const maxRow = this.$config.getMaxRow; |
| 1981 | let indx: (string | number)[] |
| 1982 | let values = [] |
| 1983 | |
| 1984 | if (this.shape[0] > maxRow) { |
| 1985 | //slice rows to show [max_rows] rows |
| 1986 | const sfSlice = this.iloc([`0:${maxRow}`]); |
| 1987 | |
| 1988 | indx = sfSlice.index |
| 1989 | values = sfSlice.values; |
| 1990 | |
| 1991 | } else { |
| 1992 | indx = this.index |
| 1993 | values = this.values; |
| 1994 | } |
| 1995 | |
| 1996 | const tabledata = values.map((x, i) => [indx[i], x]) |
| 1997 | return table(tabledata as any); |
| 1998 | } |
| 1999 | |
| 2000 | /** |
| 2001 | * Returns the logical AND between Series and other. Supports element wise operations and broadcasting. |