Quiz on Pandas to_json Method



1. What is the purpose of the to_json() method in Pandas?
2. Which parameter in to_json() specifies the orientation of the JSON string?
3. What is the default orientation when using to_json() without specifying it?
4. Which of the following is NOT a valid orientation option in to_json()?
5. Can you use the to_json() method to save a DataFrame directly to a file?

Advertisements