Help Please! Looking for code for visualisation

Hi all

I am complete novice in coding 6 weeks in… I am working on large data set 18 columns with 1,282,354 entries about customer complaints for my assignment and I’m stuck on this issue:

The data set contains Date_Received column in this format YYYY-MM-DD, there is 1,282,354 rows.
I want to create a graph that will show seasonality of complaints. I want to count how many complaints were received in each month in each year and put it on the graph.
I’ve added at the end column Yeah and Month in hopes this will help me but it only confused me more

Any direction i greatly appreciated as I’m trying to figure this out for few hours now :open_mouth:
Thank you,

Date_Received	Product	Sub-product	Issue	Sub-issue	Complaint_Detail	Public_Response	Company	State	ZIP_Code	Consumer_Consent	Medium	Date_Sent	Response_Detail	Timely_Response	Disputed	Complaint ID	Year	Month
0	2019-05-10	Checking or savings account	Checking account	Managing an account	Problem using a debit or ATM card	No Data	No Data	NAVY FEDERAL CREDIT UNION	FL	328XX	N/A	Web	2019-05-10	In progress	Yes	N/A	3238275	2019	5
1	2019-05-10	Checking or savings account	Other banking product or service	Managing an account	Deposits and withdrawals	No Data	No Data	BOEING EMPLOYEES CREDIT UNION	WA	98204	N/A	Referral	2019-05-10	Closed with explanation	Yes	N/A	3238228	2019	5
2	2019-05-10	Debt collection	Payday loan debt	Communication tactics	Frequent or repeated calls	No Data	No Data	CURO Intermediate Holdings	TX	751XX	N/A	Web	2019-05-10	Closed with explanation	Yes	N/A	3237964	2019	5
3	2019-05-10	Credit reporting, credit repair services, or o...	Credit reporting	Incorrect information on your report	Old information reappears or never goes away	No Data	No Data	Ad Astra Recovery Services Inc	LA	708XX	N/A	Web	2019-05-10	Closed with explanation	Yes	N/A	3238479	2019	5
4	2019-05-10	Checking or savings account	Checking account	Managing an account	Banking errors	No Data	No Data	ALLY FINANCIAL INC.	AZ	85205	N/A	Postal mail	2019-05-10	In progress	Yes	N/A	3238460	2019	5

pandas is a great tool for this, together with matplotlib.

https://pandas.pydata.org/docs/getting_started/intro_tutorials/04_plotting.html#min-tut-04-plotting

It is quite a lot to learn, but trust me, drawing your own plots is harder. I’m new to the topic myself, but can report a good learning experience at kaggle.com .

Many tutorials will assume you are using a Jupyter notebook, but you can install everything on your own computer.

Thanks Jeff
It is sometimes mind boggling, but I have figured it out with seaborn. The graph looks good for my needs. Just now wondering how I can edit Legend to show names of months instead of numbers

plt.figure(figsize=(20, 6))
sns.countplot(data=compl_df, x="Year", hue="Month")`

Actually figured it out

plt.figure(figsize=(20, 6))
sns.countplot(data=compl_df, x="Year", hue="Month", palette=("Paired"))
plt.legend(labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])
plt.title("Fig4. Complaints Received per Month between 2011 and 2019")
plt.xlabel("Year")
plt.ylabel("Number of Complaints")
plt.show()

2 Likes