This file contains hidden or 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
| def xmassTree(floors): | |
| for x in [z for z in range(1, floors * 2 + 1, 2)]: | |
| floors -= 1 | |
| print(' ' * floors, '*' * x) | |
| xmassTree(5) | |
| def xmasttree(count): |
This file contains hidden or 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
| numbers = [1, 2, 3, 2, 2, 2, 2, 2, 9, 1] | |
| def find_most_common_number(numbers): | |
| from collections import Counter | |
| return print(Counter(numbers).most_common(1)[0][0]) | |
| def find_most_common_number(numbers): | |
| count_list = [[x, numbers.count(x)] for x in set(numbers)] |
This file contains hidden or 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
| import os | |
| import pandas as pd | |
| from google.analytics.data_v1beta import BetaAnalyticsDataClient | |
| from google.analytics.data_v1beta.types import ( | |
| DateRange, | |
| Dimension, | |
| Metric, | |
| MetricType, |
This file contains hidden or 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
| import pandas as pd | |
| # Specify the CSV file path | |
| csv_file_path = "C:\projects\webflow\forms_data\email-form-2024-06-28.csv" # this need to be changed to your file path | |
| # Read the CSV file with date format specified for 'Date' column | |
| df = pd.read_csv(csv_file_path, parse_dates=['Date'], date_format='%m/%d/%Y %I:%M:%S %p') | |
| # Set the specific period of time | |
| start_date = pd.to_datetime('2024-07-01') |