Click here to Skip to main content
14,870,739 members

Comments by Eddie Winch (Top 20 by date)

Eddie Winch 29-Aug-20 6:35am View
   
Deleted
Can anyone help me ?

Eddie
Eddie Winch 21-Aug-20 13:12pm View
   
Hi OriginalGriff,

I have added the following lines to my Code :-

display['DATE'] = pd.to_datetime(display['DATE'])

display = display.sort_values(by='DATE', key=lambda col: 100 * col.dt.day + col.dt.month)

display['DATE']= pd.to_datetime(display['DATE']).dt.strftime('%d-%b-%Y')

display

And after upgrading to the latest Version of Pandas, which accepts sort_values with a Key argument, when I run my full Code, I get the DataFrame Output I want.

Many thanks for all your help ))

Best Regards

Eddie Winch
Eddie Winch 20-Aug-20 13:13pm View
   
Deleted
Hi OriginalGriff,

Could you look at the following Thread ? :-

https://www. dreamincode.net/forums/topic/419933-filtering-rows-in-pandas-dataframe-considering-month-and-year/

And tell me where I have gone wrong ?

Eddie
Eddie Winch 20-Aug-20 11:32am View
   
I am not sure what parsing each line means, I should be able to convert the date information to datetime though.
Eddie Winch 20-Aug-20 10:56am View
   
I think I just need to modify the Line of Code :- display.sort_values(by=['DATE'])

and or the Line of Code :- (df3['DATE'].str.contains('-10$|15$')) to get the answer I want, could you suggest what I should add or change in those lines of Code, to get the DataFrame Output I want ?

Best Regards

Eddie
Eddie Winch 20-Aug-20 9:59am View
   
Hi OriginalGriff,

Sorry could you explain how to do that ? I am not sure where to modify the Code exactly, many thanks for your help.

Regards

Eddie Winch
Eddie Winch 20-Aug-20 9:57am View
   
Deleted
Hi OriginalGriff,

Sorry could you explain how to do that, I am not sure where to modify the Code exactly, many thanks for your help.

Regards

Eddie Winch
Eddie Winch 27-Jan-20 12:07pm View
   
Hi Richard,

The issue is with the Python Code, which needs modifying, the Jupyter Notebook package, works fine. The Python Code is being run in Jupyter Notebook. I don't think, that there is a Jupyter Notebook Help Forum, but I will check to see if there is.

Regards

Eddie
Eddie Winch 27-Jan-20 11:04am View
   
I see, unless you have Jupyter Notebook installed, you won't be able to help me, I don't think, unless I post the Output I get, when I run the Code. Maybe that would make things clearer ? I am not sure how to post the Output properly. Eddie
Eddie Winch 27-Jan-20 10:27am View
   
Sorry, Yes this is a Python Issue, Jupyter Notebook is the Program used to manipulate Data, from .csv Files .xls Excel Files etc, using Pandas. Have you heard of Pandas ? which is part of Python, used to manipulate Data from those types of Files. Using Python Code, as part of that manipulation.
Eddie Winch 27-Jan-20 10:18am View
   
Deleted
Sorry, Yes this is a Python Issue, Jupyter Notebook is the Program used to manipulate Data, from .csv Files .xls Excel Files etc, using Pandas. Have you heard of Pandas ? which is part of Python, used to manipulate Data from those types of Files. Using Python Code, as part of that manipulation.
Eddie Winch 27-Jan-20 9:50am View
   
If you run the full Code, in Jupyter Notebook, it will make more sense.
Eddie Winch 27-Jan-20 9:49am View
   
That Code, says what Columns to display, in the DataFrame, i.e. from the Excel File Document. If you look at the Full Code, you will see what I mean.
Eddie Winch 27-Jan-20 9:40am View
   
df = pd.DataFrame(data, columns= ['Venue','A/C','DISPLAY/','Date','BID','Durn'])
Eddie Winch 27-Jan-20 9:39am View
   
Deleted
df = pd.DataFrame(data, columns= ['Venue','A/C','DISPLAY/','Date','BID','Durn'])
Eddie Winch 27-Jan-20 9:29am View
   
Hi ZurdoDev, Many thanks for pointing that out to me, I should have worked
that out myself.

Regards

Eddie
Eddie Winch 27-Jan-20 9:27am View
   
Deleted
Hi ZurdoDev, Many thanks for pointing that out to me, I should have worked
that out myself.

Regards

Eddie
Eddie Winch 27-Jan-20 9:16am View
   
Hi Richard, The Date comes up, simply by showing the Date Column in the Output. Can you see the issue with Dates, if you run the Code in Jupyter Notebook, and look at the Excel Document ?

I would like to post the Output I get, when I run the Code, but don't know how to ? Also I have updated, the 'What I have tried' Section, in my Post.

Eddie
Eddie Winch 27-Jan-20 9:15am View
   
Deleted
Hi Richard, The Date comes up, simply by showing the Date Column in the Output. Can you see the issue with Dates, if you run the Code in Jupyter Notebook, and look at the Excel Document ?

I would like to post the Output I get, when I run the Code, but don't know how to ?

Eddie
Eddie Winch 26-Jan-20 12:56pm View
   
Deleted
Hi Richard, The Date comes up, simply by showing the Date Column in the Output. Can you see the issue with Dates, if you run the Code in Jupyter Notebook, and look at the Excel Document ?

I would like to post the Output I get, when I run the Code, but don't know how to ?

Eddie