Skip to content
Discussion options

You must be logged in to vote

Python tuples were given their own dedicated syntax like all other datastructures instead of piggybacking off the comma expression syntax. i.e. #(1 2 3)

All the following are equivalent

(setv x-data10 (. all-data.iloc [#((slice 0 10) [0 1 2 3 4 5 6 7 8])] values))
(setv x-data10 (.values (get all-data.iloc #((slice 0 10) [0 1 2 3 4 5 6 7 8]))))

there's also ncut from hyrule, which helps with this kind of multi-dimensional slicing

(setv x-data10 (.values (ncut all-data.iloc 0:10 [0 1 2 3 4 5 6 7 8])))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@esakilpi
Comment options

Answer selected by esakilpi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants