Associate Consultant 1
Associate Consultant 1 Interview Questions and Answers
Q1. How will you add and remove columns from pandas dataframe.
To add or remove columns from a pandas dataframe, we can use the 'drop' and 'insert' methods.
To remove a column, we can use the 'drop' method with the 'axis' parameter set to 1.
To add a column, we can simply assign a new column to the dataframe with a name and values.
To insert a column at a specific position, we can use the 'insert' method with the index and column name.
We can also rename columns using the 'rename' method.
Q2. What are the difference between List and Tuples?
Lists are mutable while Tuples are immutable.
Lists use square brackets [] while Tuples use parentheses ().
Lists can be modified while Tuples cannot be modified.
Lists are used for homogenous items while Tuples are used for heterogenous items.
Lists are slower than Tuples.
Example of List: my_list = [1, 2, 3]
Example of Tuple: my_tuple = (1, 'hello', 3.4)
Associate Consultant 1 Jobs
0Interview Questions of Similar Designations
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month