You have a DataFrame df with the shape (4,3) with the following data:\r\n\r\npython\r\n\r\nSales| Realised Profit |Expected Profit\r\n\r\n||\r\n\r\n451210 |84012 |165813\r\n\r\n549845 |64205 |104877\r\n\r\n231384 |52209 |175926\r\n\r\n781206 |59121 |124561\r\n\r\n \r\n\r\nBased on this data, what is the output of the following code\r\n\r\npython\r\n\r\ntry:\r\n\r\ndf.drop("Expected Profit", axis=1, inplace=True)\r\n\r\nprint (df.shape)\r\n\r\nexcept:\r\n\r\nprint(df.shape)\r\n

🎲 Try a Random Question  |  Total Questions in Quiz: 18  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Python Clean Data — practice the complete quiz, review flashcards, or try a random question.

For Pluralsight Skill Assessments.


You have a DataFrame df with the shape (4,3) with the following data:\r\n\r\npython\r\n\r\n<p>Sales| Realised Profit |Expected Profit</p>\r\n\r\n<p>||</p>\r\n\r\n<p>451210 |84012 |165813</p>\r\n\r\n<p>549845 |64205 |104877</p>\r\n\r\n<p>231384 |52209 |175926</p>\r\n\r\n<p>781206 |59121 |124561</p>\r\n\r\n<p> </p>\r\n\r\n<p>Based on this data, what is the output of the following code</p>\r\n\r\n<p>python</p>\r\n\r\n<p>try:</p>\r\n\r\n<p>df.drop("Expected Profit", axis=1, inplace=True)</p>\r\n\r\n<p>print (df.shape)</p>\r\n\r\n<p>except:</p>\r\n\r\nprint(df.shape)\r\n