Created
January 30, 2024 14:52
日毎の販売回数の集計
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#日毎の販売回数の集計 | |
# Convert the 'DateTime' column to datetime objects | |
bakery_data['DateTime'] = pd.to_datetime(bakery_data['DateTime']) | |
# Extract the date from the 'DateTime' column | |
bakery_data['Date'] = bakery_data['DateTime'].dt.date | |
# Group by the date and count the number of transactions per day | |
daily_sales = bakery_data.groupby('Date')['TransactionNo'].nunique() | |
# Display the first few rows of the daily sales | |
daily_sales |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment