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

Open
MohitMehndiratta wants to merge 2 commits into
krishnaik06:masterfrom
MohitMehndiratta:master
Open

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
MohitMehndiratta wants to merge 2 commits into
krishnaik06:masterfrom
MohitMehndiratta:master

Conversation

@MohitMehndiratta
Copy link
Copy Markdown

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
Copy Markdown

Thanks

@shivam1750
Copy link
Copy Markdown

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