Pandas List All Unique Values Based On Groupby
I have a dataframe that has worksite info.District# Site# Address 1 1 123 Bayview Ln 1 2 456 Example St 2 36 789 Hello Dr 2 44 789 Hello DrI am trying to transform this dataframe to add a column with...
View ArticlePandas Unpack List of Dicts to Columns
I have a dataframe that has a field called fields which is a list of dicts (all rows have the same format). Here is how the dataframe is structured:formId fields 123 [{'number': 1, 'label': 'Last...
View ArticlePandas Export to Excel with MultiIndex Column with Formatting
I have a dataframe in Pandas which groups shift attendance for specific daysDAYS = ['26-Aug','27-Aug','28-Aug']SHIFTS = ['S1','S2','S3']EMPLOYEES = ['John Doe','Jane Doe']# Create Column Index of...
View ArticleCheck if Series has Values in Range
I have a Pandas dataframe that has user information and also has a column for their permissions:UserName PermissionsJohn Doe 02John Doe 11 Example 09 Example 08 User3 11I am trying to create a new...
View ArticlePandas Groupby and Filter based on first record having date greater than...
I have a dataframe that shows details about employees and the site they are at and the positions they have held. The dataframe has columns for Site Id, Employee ID, and StartDate (plus a lot more...
View ArticlePandas Add Unique Values from Groupby to Column
I have a dataframe that lists a users codesUserID Code 123 A 123 B 123 A 456 C 456 DHow do I add a column that shows all of the users unique codes?UserID Code UniqueCodes 123 A [A, B] 123 B [A, B] 123...
View ArticlePython Requests POST Array in JSON Format [closed]
I am making a POST request to a website with this data:payload = offset=0&q=&filters=&code%5B%5D=1234&code%5B%5D=5678response = requests.post(url, data=payload)However I want to POST...
View ArticlePower Automate Try multiple API Keys until success
I have a power automate flow that receives POST data from a webhook (using When a HTTP Request is Received). I have a step in this flow that does:HTTPType: GETURI:...
View ArticlePandas Add Index to MultiIndex
I am creating a MultiIndex using the following code:idx = pd.MultiIndex.from_product( [df['Day'].tolist(), ['A','B','C']], names=['Day', 'Status'])Which creates:MultiIndex([('01-Jun', 'A'), ('01-Jun',...
View ArticlePandas Return Corresponding Column Based on Date Being Between Two Values...
I have a Pandas dataframe that is setup like so:Code StartDate EndDate A 2024-07-01 2024-08-03 B 2024-08-06 2024-08-10 C 2024-08-11 2024-08-31I have a part of my code that iterates through each day...
View ArticleComment by Bijan on How to generate a random number but it should NOT exist...
There are SQL functions to create UUID.
View ArticleComment by Bijan on there is a syntax issue on the elif line
You can't do if/else/elif. Change your elif to if
View ArticleAnswer by Bijan for Power Automate Get Filename if Contains Special Character
I ended up just creating an if statement to check if the filename contains filename=if( contains(outputs('HTTP')['headers']?['Content-Disposition'],'filename='), # Check...
View ArticlePower Automate Get Filename if Contains Special Character
I created a Power Automate flow that performs an HTTP GET request to download a PDF file and save it to Sharepoint.The filename is in the output of the HTTP headers with Content-Disposition header...
View ArticleConvert 'Lastname, Firstname' to 'Firstname Lastname' in mixed column [closed]
I have a very large dataset with a Name column that is comprised of Vendor Names mixed with Employee Names (in format of Lastname, Firstname or rarely Lastname, Firstname Middleinitial). In Pandas, I...
View ArticleComment by Bijan on Pandas Detect if Series Value contains Names
@Anerdw I added some examples.
View ArticleSort an array by another array of value priorities which may have more values...
I have a comma separated string/array:$input = "facebook,steam,tumblr,email,instagram,twitter,twitch,youtube,pinterest,amazon,disqus";$input = explode(",", $input);that I want to be ordered based on...
View ArticleAPScheduler Set misfire_grace_time globally
I am trying to apply misfire_grace_time globally for all of my jobs. According to the Doc Page it says:The scheduler will then check each missed execution time against the job’s misfire_grace_time...
View Article