Skip to content

Implemented a dynamic way to create weekday names dictionary and also Changed weekday_name function to day_name as it was giving some error : "'DatetimeProperties' object has no attribute 'weekday_name' : #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MohitMehndiratta
Copy link

df['Weekday'] = df['Date'].dt.weekday_name
Change it to:
df['Weekday'] = df['Date'].dt.day_name()

df['Weekday'] = df['Date'].dt.weekday_name
Change it to:
df['Weekday'] = df['Date'].dt.day_name()
@MohitMehndiratta MohitMehndiratta changed the title Changed weekday_name function to day_name Implemented a dynamic way to create weekday names dictionary and also Changed weekday_name function to day_name as it was giving some error : "'DatetimeProperties' object has no attribute 'weekday_name' : Jul 16, 2020
@sheikhmasud16
Copy link

Thanks

@shivam1750
Copy link

df['Weekday'] = df['Date'].dt.weekday_name
Change it to:
df['Weekday'] = df['Date'].dt.weekday

it directly give the number formate data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants