How to create new variable whose values should be square of 2 different data in python
Answers
Answered by
0
Answer:
your answer
Explanation:
Here is my code to calculate the square difference between imdbRating and imdbVotes
imdb_data['imdbVotes'] = imdb_data['imdbVotes'].astype(int)
imdb_data['imdbRating'] = imdb_data['imdbRating'].astype(int)
imdb_data['new'] = imdb_data['imdbRating'] - imdb_data['imdbVotes']
This is the error I got with Python 3.7.0 + pandas 0.23.4:
Similar questions