Hi there,
Could someone please explain very clearly what the following piece of code is doing?
Could someone please explain very clearly what the following piece of code is doing?
def question_set(X): qset = [[] for col in X[0]] for row in X: for i,col in enumerate(row): qset[i].append(col) return [set(row) for row in qset] question_set(X_train)I'm quite new to this, so I thank you greatly!

Larz60+ write Nov-19-2020, 04:04 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Added tags for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Added tags for you this time. Please use bbcode tags on future posts.