# import necessary libraries
import pandas as pd
# create a time series
time_series = pd.Series(["2022-01-10", "2022-02-15", "2022-03-23",
"2022-04-09", "2022-05-19","2022-06-30"])
# convert series to datetime
df = pd.DataFrame({"date": pd.to_datetime(time_series)})
# extract day of month, week number, & day of year using dt accessor
day_of_month = df['date'].dt.day
week_number = df['date'].dt.isocalendar().week
day_of_year = df['date'].dt.dayofyear
# combine results into a new dataframe
results = pd.DataFrame({'day_of_month': day_of_month,
'week_number': week_number,
'day_of_year': day_of_year})
# concatenate the dataframe with the original time series
df = pd.concat([df, results], axis=1)
# print results
print(df)