Reputation: 1
I have a DataFrame where each row represents an event, and I need to generate a parent ID column that groups related rows based on specific conditions. For example, rows with similar timestamps or matching category values should have the same parent ID. The dataset I am working with includes menu data similar to the Greggs menu, where items might need to be grouped based on category, availability, or pricing rules. What is the best approach in Pandas to efficiently assign parent IDs while ensuring proper grouping?
Upvotes: 0
Views: 21