PyTorch has a one_hot() function for converting class indices to one-hot encoded targets.
You can use the top-level torch.softmax() function from PyTorch for your softmax activation needs.
When you absolutely have to iterate over rows in a Pandas DataFrame, use the .itertuples() method.
This post describes a trick for installing/upgrading Python packages in a Jupyter notebook. It’s useful for scratch code, but don’t do this when you need reproducible code.
There are a few ways to drop columns and rows in Pandas. This post describes the easiest way to do it and provides a few alternatives that can sometimes be useful.