Method
setIndex
(index: Array<number | string | (number | string)>, options?: { inplace?: boolean })
Source from the content-addressed store, hash-verified
| 956 | */ |
| 957 | setIndex(index: Array<number | string | (number | string)>, options?: { inplace?: boolean }): Series |
| 958 | setIndex(index: Array<number | string | (number | string)>, options?: { inplace?: boolean }): Series | void { |
| 959 | const { inplace } = { inplace: false, ...options } |
| 960 | |
| 961 | if (!index) { |
| 962 | throw Error('Param Error: Must specify index array'); |
| 963 | } |
| 964 | |
| 965 | if (inplace) { |
| 966 | this.$setIndex(index) |
| 967 | } else { |
| 968 | const sf = this.copy(); |
| 969 | sf.$setIndex(index) |
| 970 | return sf; |
| 971 | } |
| 972 | } |
| 973 | |
| 974 | |
| 975 | /** |
Callers
nothing calls this directly
Tested by
no test coverage detected