This is just a property of having libraries. If you've got the same libraries in Java then the code looks identical except that you stick to word "var" in front of lines 4 and 6 and you don't have named arguments.
Python does have a great data processing ecosystem. But that isn't really a property of the language.