================================================================================
  Question 43: Pandas Grouping Based on All Columns & Groupby Value Counts
================================================================================

FULL QUESTION:
Write a Pandas program to split the following data frame into groups based
on all columns and calculate groupby value counts on the data frame.

Test Data (Table 6):
Id | type | book
1  | 10   | Math
2  | 15   | English
1  | 11   | Physics
1  | 20   | Math
2  | 21   | English
1  | 12   | Physics
2  | 14   | English

SHORT QUESTION:
Splits DataFrame into groups based on all columns and computes groupby value counts.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 43: Pandas Grouping Based on All Columns & Groupby Value Counts

- Prerequisites: Python 3.x, Pandas (pip install pandas).
- Setup: None.
- How to Run: python question_43.py
- Expected Behavior: Groups by all columns and computes frequency counts of matching tuples.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_43.py
--------------------------------------------------------------------------------
import pandas as pd

book_data = pd.DataFrame({
    'Id': [1, 2, 1, 1, 2, 1, 2],
    'Type': [10, 15, 11, 20, 21, 12, 14],
    'Book': ['Math', 'English', 'Physics', 'Math', 'English', 'Physics', 'English']
})

group_counts = book_data.groupby(['Id', 'Type', 'Book']).value_counts()

print("GroupBy Value Counts across all columns:")
print(group_counts)
--------------------------------------------------------------------------------
