CHAPTER 1 – PYTHON PROGRAMMING 2 Assignment 1
Short Answer Questions (10 Questions)
1. What is a NumPy array? How is it different from a Python list?
2. How do you create a Pandas Series from a dictionary? Provide an example.
3. How do you read a CSV file in Pandas? Provide a code example.
4. Write a Python command to export a DataFrame to a CSV file.
5. Explain the difference between .dropna() and .fillna().
6. What is the use of df.groupby() in Pandas?
7. What is Linear Regression? Give a simple definition.
8. Name two evaluation metrics used in Linear Regression.
9. How do you add a new row to a Pandas DataFrame?
10. What is the use of np.mean() in NumPy?
Long Answer Questions (10 Questions)
1. Explain the key differences between NumPy arrays and Pandas DataFrames.
2. How do you handle missing values in a dataset? Explain with code examples.
3. What are the different ways to create a Pandas DataFrame?
4. Describe the steps to implement a Linear Regression model using Scikit-learn.
5. Explain the process of importing and exporting CSV files using Pandas.
6. What are the different attributes of a Pandas DataFrame? Explain with examples.
7. How do you apply statistical operations like mean, median, and standard deviation in NumPy?
8. Write a Python program to create a Pandas DataFrame and perform basic operations like
adding/deleting columns and rows.
9. What is model evaluation in Machine Learning? Explain Mean Squared Error and R-squared.
10. Discuss the importance of Pandas in data analysis with a real-world example.