Test your knowledge of data analysis using NumPy, Pandas, DuckDB, and SQL integration. Questions are categorized into three levels: Basic, Intermediate, and Advanced.
Basic Questions
- Create a NumPy array of 10 zeros.
- Convert a Python list [1,2,3,4,5] to a NumPy array.
- Use NumPy to generate an array of even numbers from 2 to 20.
- Create a Pandas DataFrame from a dictionary of lists.
- Read a CSV file into a Pandas DataFrame.
- Display the first 5 rows of a DataFrame using head().
- Find the shape of a NumPy array.
- Sort a DataFrame based on a column.
- Filter rows where column value is greater than 50.
- Execute a simple SELECT query using DuckDB or sqlite3.
Intermediate Questions
- Find the mean, median, and standard deviation of a NumPy array.
- Merge two DataFrames using a common column.
- Use groupby() in Pandas to get average values by group.
- Use DuckDB to run a SQL query on a Pandas DataFrame.
- Drop missing values from a DataFrame.
- Plot a bar chart using Pandas built-in plotting.
- Reshape a NumPy array using reshape().
- Use Pandas to read an Excel file.
- Apply a lambda function to a column in a DataFrame.
- Write data from a DataFrame into a new SQL table using Pandas.
Advanced Questions
- Use NumPy broadcasting to add two arrays of different shapes.
- Implement a sliding window mean using NumPy.
- Use Pandas pivot_table for advanced data aggregation.
- Run JOIN queries using DuckDB on two CSV files.
- Optimize performance by selecting specific columns while reading a large file in Pandas.
- Perform data transformation using SQLAlchemy ORM.
- Build a pipeline that reads a CSV, processes it with Pandas, and writes results to SQL.
- Handle time series data with DatetimeIndex in Pandas.
- Use NumPy's advanced indexing to modify specific elements.
- Create a custom Pandas accessor for reusable data operations.