import ntlk
lemmatizer = ntlk.WordNetLemmatizer()
print(lemmatizer.lemmatize("goes"))
print(lemmatizer.lemmatize("transforming"))
The first example will with "goes" do work. The output is: "go". The second does not work. I get the output "transforming" but should be "transform".
You need to pass the tag 'v' to have the lemmatizer interpret the word as a verb. If you don't it will assume it is a noun.
There are some helpful answers for you here.