Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Return the [Date] that within the last 14 days
Post: RE: Return the [Date] that within the last 14 days
(Dec-07-2022, 10:27 PM)snippsat Wrote: Can do it like this and Pandas has it own Date/Time stuff build in.
import pandas as pd
from io import StringIO
data = StringIO('''\
Date Tval Rnum Min Blend ... |
|
bnadir55 |
General Coding Help |
5 |
1,183 |
Dec-08-2022, 10:31 AM |
|
|
Thread: Return the [Date] that within the last 14 days
Post: RE: Return the [Date] that within the last 14 days
(Dec-07-2022, 01:36 PM)deanhystad Wrote: Please show what you have tried.
date = [Date] >= datetime.now() - timedelta(hours=72, minutes=0)] |
|
bnadir55 |
General Coding Help |
5 |
1,183 |
Dec-07-2022, 01:47 PM |
|
|
Thread: Return the [Date] that within the last 14 days
Post: Return the [Date] that within the last 14 days
Hi, I have a column [Date] in df that return date in this format : 20220628T065216.437 GMT
I need to return the [Date] that within the last 3 days,
tried with existing format : 20220628T065216.437 GMT... |
|
bnadir55 |
General Coding Help |
5 |
1,183 |
Dec-07-2022, 01:09 PM |
|
|
Thread: color column in mail html df
Post: color column in mail html df
I have a df that I want to send as to_html in the mail, this df carries columns and one of them is called column A, how can I color this entire column A in red in the mail body? Thx! |
|
bnadir55 |
General Coding Help |
0 |
729 |
Aug-14-2022, 07:11 AM |
|
|
Thread: Convert .xlsx to Format as Table
Post: Convert .xlsx to Format as Table
Hi, I want to create a SharePoint list based on a regular table .xlsx, when I try to use it, SharePoint says that it must first be formatted as "Format as Table", is there a way in Python in which I c... |
|
bnadir55 |
General Coding Help |
0 |
896 |
Aug-11-2022, 06:39 AM |
|
|
Thread: Progress bar
Post: Progress bar
Hello,
is there a way to show the progress bar using PySimpleGUI, while the script is running, no use with a for loop in the script, just showing the progress bar as long as the script is doing whate... |
|
bnadir55 |
General Coding Help |
1 |
1,839 |
Apr-11-2022, 11:35 AM |
|
|
Thread: Removing the index column from df
Post: RE: Removing the index column from df
Thx! if I got you right,
I need to use the nonindexed df to be used in the mail sent and the empty check, what you show is using the non-index df for the print and the indexed df for the mail and emp... |
|
bnadir55 |
General Coding Help |
7 |
3,099 |
Apr-05-2022, 01:27 PM |
|
|
Thread: Removing the index column from df
Post: RE: Removing the index column from df
Thx! changed as you sugested to this : df = df.to_string(index=False)
but later on in the script I'm sending mail using this :
mail.HTMLBody = df.to_html()
and checking if df is empty :
if not df.e... |
|
bnadir55 |
General Coding Help |
7 |
3,099 |
Apr-05-2022, 11:55 AM |
|
|
Thread: Removing the index column from df
Post: RE: Removing the index column from df
Yes, also created now a whole new df :
new_df = df.reset_index(drop=True)
print(new_df)and still got the index # (see attached) : |
|
bnadir55 |
General Coding Help |
7 |
3,099 |
Apr-05-2022, 08:36 AM |
|
|
Thread: Removing the index column from df
Post: Removing the index column from df
Hello all,
I have a data frame that I pull from excel using: df = pd.read_excel(file.xlsx)
when I print results it returns with the index column on the left (0,1,2,3,4,...)
no matter what I tried, i... |
|
bnadir55 |
General Coding Help |
7 |
3,099 |
Apr-05-2022, 07:03 AM |
|
|
Thread: Using like statement in pandas df
Post: Using like statement in pandas df
Hello,
I have a function in which I want to return in a column all the values that like ABC and return it in a new column as ABC , but I get an error, please advise, Thx!
def Dest_new (row):
if... |
|
bnadir55 |
General Coding Help |
1 |
1,348 |
Feb-03-2022, 01:05 PM |
|
|
Thread: DataFrame .xlsx max()
Post: RE: DataFrame .xlsx max()
(Jan-22-2022, 10:52 PM)snippsat Wrote: (Jan-22-2022, 06:28 PM)bnadir55 Wrote: Thx,
here is what I need return the left table with all the rows and columns that carry the max(Order_date) grouped b... |
|
bnadir55 |
General Coding Help |
6 |
1,976 |
Jan-23-2022, 10:05 AM |
|
|
Thread: DataFrame .xlsx max()
Post: RE: DataFrame .xlsx max()
(Jan-22-2022, 11:47 AM)snippsat Wrote: Try:
df = df[df.groupby(['order id'],as_index=False)[['order date']].max()]
(Jan-22-2022, 05:46 PM)snippsat Wrote: You should post a sample of the DataFrame ... |
|
bnadir55 |
General Coding Help |
6 |
1,976 |
Jan-22-2022, 06:28 PM |
|
|
Thread: DataFrame .xlsx max()
Post: RE: DataFrame .xlsx max()
Thx, getting this error : ValueError: Boolean array expected for the condition, not object |
|
bnadir55 |
General Coding Help |
6 |
1,976 |
Jan-22-2022, 11:53 AM |
|
|
Thread: DataFrame .xlsx max()
Post: DataFrame .xlsx max()
Friends!
I have a data frame from .xslx that return 4 columns, order id, order date, order requester, order urgency,
I want to return the max() order date by order id, BUT to retrieve back the entire ... |
|
bnadir55 |
General Coding Help |
6 |
1,976 |
Jan-22-2022, 10:55 AM |