Unemployment rate line plot visualization

Hi , when i run the code then it doesnt show line plot it shows vertical strip like that, why?

Screen Link:

My Code:

Replace this line with your code

What I expected to happen:

What actually happened:

Replace this line with the output/error

Hi @mamun216,

Could you please next time share the link on the mission screen and also wrap your code in backticks, according to these guidelines? It will be much easier to the volunteers here to help you. Thanks!

Anyway, about your question. I suppose the mission screen is this one, right? Your code looks absolutely fine, but I suspect something happened when you were calculationg the MONTH column. Please run this code:

unrate['MONTH'].unique()

The expected output is:

array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12], dtype=int64)

Have you had any issues with plotting at the previous mission screens of that course? For example, at this one.

image

it looks like that

Then the initial issue is with the DATE column, that caused also the issue in the month column.

By the way, is the name of this column month or MONTH? Because they are 2 different names.

Could you please share your full code here? Starting from importing the libraries and reading the dataset into pandas.

Please, when sharing your full code, don’t download it as a screenshot. Instead, please surround it with 3 backticks in the beginning and 3 backticks in the end. I mean, put this ``` on a new line, then starting from the next line put all the lines of your code, then on the next line put again ```

‘’'Unemployment rate in USA from 1948 to 2016…ipynb (248.5 KB) ‘’'

Click here to view the jupyter notebook file in a new tab

I have just run your notebook, without modifying anything. Everything works perfectly, all the visualizations are displayed correctly.

Unemployment rate in USA from 1948 to 2016…ipynb (296.3 KB)

Click here to view the jupyter notebook file in a new tab

It seems that the issue in your project starts where you use the first time datetime library. Please add importing it in the code cell [1]:

import numpy as np
import pandas as pd
import datetime as dt

Then, re-run the project.

thanks elena. my notebook anaconda jupyter may be something missing. its run same as before, no line shows at all.

May i share here with community some data csv file to make for analysis, then i will compare with my one. It should not be publishable to others, only feedback to me. I am doing some volunteer work, they gave me some data and i have to analyse for them. what is your opinion? how can i get best help from community?
kind regrads
abdulla mamun

Hi Abdulla,

Sorry, only now I saw your question.

About Anaconda. If you followed my suggestion to run import datetime as dt in your notebook, and still nothing changed, the plot is not visualized, then I would recommend you to re-install Anaconda. It seems that something goes wrong with it, and it can also impact your future projects, giving wrong results.

About your project, the best approach for you (after re-installing Anaconda) would be to start doing your analysis and then, if you encounter any issue with it that you cannot resolve, if you feel stuck, then you can share it with the Community, and the volunteers here will try to help you. Don’t forget to tag your question as “Non-DQ Courses”, for your post to be categorized correctly.

Thanks elena again. It was same figure in my google colab notebook also. But the next guided project on gender gap on major degrees analysis where is also line chart, that working fine.

1 Like