Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: pandas str.extract multiple regex groups with OR
Post: RE: pandas str.extract multiple regex groups with ...

Unfortunately the text contains other unrelated numbers, such as 25 items, 2" long, 4 inches deep so I only want the values when they match the regex I provided. I also seem to have a common use case ...
pythonidae Data Science 2 7,914 Dec-19-2019, 05:43 PM
    Thread: pandas str.extract multiple regex groups with OR
Post: pandas str.extract multiple regex groups with OR

Hi. I have a column of text with inputs like, 3" deep, 4 inches deep, 5" depth. I wanted to extract just the value and put this in a new column. From regex101.com, I confirm the following captures a...
pythonidae Data Science 2 7,914 Dec-19-2019, 09:38 AM
    Thread: Code improvement: groupby and operation on conditionals
Post: RE: Code improvement: groupby and operation on con...

I've found a solution for the final block of code, in order to set a 'floor' or minimum to the dataset from the table that was constructed previously. for idx, row in df.iterrows(): for analyte ...
pythonidae Data Science 6 3,707 Dec-12-2019, 05:58 AM
    Thread: Code improvement: groupby and operation on conditionals
Post: RE: Code improvement: groupby and operation on con...

Thank you! I changed the code somewhat to incorporate the location and create a dictionary of the values to lookup for each compound per location. The following works, but I don't see the right strate...
pythonidae Data Science 6 3,707 Dec-10-2019, 01:57 PM
    Thread: Code improvement: groupby and operation on conditionals
Post: RE: Code improvement: groupby and operation on con...

I've tried to replicate this reformatting from a dataframe instead of a text file, but have run into a few problems. First, to create the dataframe from this example: import sys from io import Strin...
pythonidae Data Science 6 3,707 Dec-09-2019, 06:19 AM
    Thread: Code improvement: groupby and operation on conditionals
Post: RE: Code improvement: groupby and operation on con...

Thank you! This is fantastic. Yes, changing the way the data is structured makes this much better to interact with. If I can ask a followup question: the data is in an existing dataframe. Is there a...
pythonidae Data Science 6 3,707 Dec-07-2019, 05:49 AM
    Thread: Code improvement: groupby and operation on conditionals
Post: Code improvement: groupby and operation on conditi...

Hello. I have data in the following format. I am looking to groupby the location, and then find the maximum value for each compound where the corresponding flag is 'U'. Quote: location compound1 ...
pythonidae Data Science 6 3,707 Dec-06-2019, 06:02 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020