Click here to Skip to main content
14,870,474 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
QuestionFinding a specific number in a string. Pin
Member 1086910714-Aug-20 11:36
MemberMember 1086910714-Aug-20 11:36 
AnswerRe: Finding a specific number in a string. Pin
Richard MacCutchan14-Aug-20 21:40
mveRichard MacCutchan14-Aug-20 21:40 
GeneralRe: Finding a specific number in a string. Pin
Member 1086910715-Aug-20 1:17
MemberMember 1086910715-Aug-20 1:17 
QuestionHow to skip a particular term in regex find and replace? Pin
usernamekiran11-Aug-20 4:34
Memberusernamekiran11-Aug-20 4:34 
AnswerRe: How to skip a particular term in regex find and replace? Pin
Gerry Schmitz11-Aug-20 6:39
mveGerry Schmitz11-Aug-20 6:39 
QuestionFind Sequence of alphabets in the string Pin
arisaravanan11-Apr-20 1:32
Memberarisaravanan11-Apr-20 1:32 
AnswerRe: Find Sequence of alphabets in the string Pin
Richard MacCutchan11-Apr-20 4:21
mveRichard MacCutchan11-Apr-20 4:21 
AnswerRe: Find Sequence of alphabets in the string Pin
Richard Deeming14-Apr-20 0:30
mveRichard Deeming14-Apr-20 0:30 
QuestionUsing A Regular Expression To Show Rows In Pandas (Python) Pin
Eddie Winch2-Feb-20 9:05
MemberEddie Winch2-Feb-20 9:05 
Hi there,

Here is part of a Python Code I have :-

#convert df['Durn'] column to datetime foramt
df['Durn']= pd.to_datetime(df['Durn'],format='%H:%M:%S').apply(pd.Timestamp)
#print("changing datatype of column Durn----->",df['Durn'].dtype)
#print("=======")
#compare minutes with extracting minutes from datetime64 column 
comparelist=[5,10,15,20,]
df['Dakota And Fighters In The Same Display Slot'] = ((df['DISPLAY/'] == 'DISPLAY') & (df['Durn'].dt.minute.isin(comparelist))).map({True:'YES', False:'NO'})
#print(df)
#print("applied... the condition to compare minutes for Durn column")
#print("=======")<pre><pre>


The Rows that, I would like showing, and that have in the 'Dakota And Fighters In The Same Display Slot' Column, saying 'NO', arn't showing in the output. For a given Venue, in the 'Venue' Column, the rows not showing, both Minute Values in the 'Durn' Column, differ i.e. are normally 5 and 10. Only the Rows with matching values, in the 'Durn' Column i.e. 5 and 5, 10 and 10, 15 and 15, 20 and 20. etc are displaying in the Output I get. Those are the ones that say 'Yes', in the Column I have mentioned already.

What Regular Expression with using Maths, could I add to my Code, so that those Rows, I want showing show ?

Any help would be appreciated

Regards

Eddie Winch Smile | :)
QuestionTSV out of a tab-based tree-like file Pin
DynV9-Nov-19 19:43
MemberDynV9-Nov-19 19:43 
Questiongetting all the image files in a HTML Inspection Pin
Member 1463488025-Oct-19 4:03
MemberMember 1463488025-Oct-19 4:03 
QuestionRe: getting all the image files in a HTML Inspection Pin
Richard MacCutchan25-Oct-19 4:15
mveRichard MacCutchan25-Oct-19 4:15 
AnswerRe: getting all the image files in a HTML Inspection Pin
Member 1463488025-Oct-19 9:38
MemberMember 1463488025-Oct-19 9:38 
GeneralRe: getting all the image files in a HTML Inspection Pin
Richard MacCutchan25-Oct-19 21:57
mveRichard MacCutchan25-Oct-19 21:57 
QuestionRegular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241529-Aug-19 14:46
MemberMember 1457241529-Aug-19 14:46 
AnswerRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Richard MacCutchan29-Aug-19 20:43
mveRichard MacCutchan29-Aug-19 20:43 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241530-Aug-19 3:23
MemberMember 1457241530-Aug-19 3:23 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241530-Aug-19 3:48
MemberMember 1457241530-Aug-19 3:48 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Richard MacCutchan30-Aug-19 4:35
mveRichard MacCutchan30-Aug-19 4:35 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241530-Aug-19 5:42
MemberMember 1457241530-Aug-19 5:42 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241530-Aug-19 5:47
MemberMember 1457241530-Aug-19 5:47 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Member 1457241530-Aug-19 7:06
MemberMember 1457241530-Aug-19 7:06 
GeneralRe: Regular Expression To Extract Everything Including the String And Before The First Space Character Pin
Richard MacCutchan30-Aug-19 21:42
mveRichard MacCutchan30-Aug-19 21:42 
QuestionRegex Expression to extract everything following a string and before a space Pin
Member 1457241529-Aug-19 6:30
MemberMember 1457241529-Aug-19 6:30 
AnswerRe: Regex Expression to extract everything following a string and before a space Pin
Richard MacCutchan29-Aug-19 6:55
mveRichard MacCutchan29-Aug-19 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.