Skip to content

QST: Pandas #55975

@wasimtikki120

Description

@wasimtikki120

Research

  • I have searched the [pandas] tag on StackOverflow for similar questions.

  • I have asked my usage related question on StackOverflow.

Link to question on StackOverflow

https://stackoverflow.com/questions/50459301/how-to-convert-dates-to-quarters-in-python

Question about pandas

Suppose you have a DataFrame with a column named 'Dates' containing datetime values. How would you create a new column 'Quarter' that indicates the quarter of the year each date falls into? Additionally, how would you efficiently aggregate and display the average value of another column, let's call it 'Sales,' for each quarter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssue that has not been reviewed by a pandas team memberUsage Question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions