Associate Consultant 1
Associate Consultant 1 Interview Questions and Answers

Asked in EXL Service

Q. How do you add and remove columns from a 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.

Asked in TCS

Q. What are the differences between Lists 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)
Interview Questions of Similar Designations



Reviews
Interviews
Salaries
Users

