Skip to main content
-1 votes
1 answer
55 views

I am trying to find a combination where it will go through the data to find matched variables for any value from the list First_row is found, any value from the list Second_row and any value from the ...
Kan's user avatar
  • 41
0 votes
1 answer
139 views

I have a number of data.frames, with names apple, banana, and coffee. I want to create, and then export, new dataframes in a for-loop corresponding to each one, call them apple_new, banana_new, and ...
s84492025's user avatar
-6 votes
0 answers
75 views

This is the beginning of my project. And I ran into many problems faster than expected — problems that no AI could help me with, I know of the moment. Just ignore the fact that it was written for ...
Mäx's user avatar
  • 36
-6 votes
1 answer
116 views

import pandas as pd a=1 b=2 c=3 for n in range(10, len(df)-1): if df.loc[n].isin([a]).any() and df.loc[n].isin([b]).any() : for x in range(0, ...
Kan's user avatar
  • 41
4 votes
3 answers
175 views

The practice question I am working on reads as: Read two strings, both of them do not contain white spaces (but may contain non-alphanumeric, such as ‘,’, ‘.’, ‘/’ ...). Display the first string ...
Andrew Attfield's user avatar
-2 votes
1 answer
67 views

I obtained a batch script from Google AI for performing string replacement on the content of a list of text files in Windows. This is what I got--with a little tweaking, first. (Just testing at this ...
Dave Clark's user avatar
0 votes
4 answers
156 views

This is more like an exercise. I have several conditions that affect 2 nested for clauses: for(...)//1st { for(...)//2nd { ... } } and since there are various possibilities (each one ...
Patrick's user avatar
  • 2,623
1 vote
1 answer
57 views

I have the following procedure written in redshift, which uses 2 for loops to get country code first and then years as per the country codes. --Procedure : sp_for_loop_test create or replace procedure ...
MAK's user avatar
  • 7,345
-3 votes
1 answer
90 views

trying to create a function to get the principal amount for a loan using the for loop for the sum of present values def presentValue(amount, num_months, interest): return (amount)/(1 + interest)**...
124567's user avatar
  • 19
0 votes
1 answer
113 views

Background As the Lean Reference's Instances for nested types example shows, in a function that implements a type class method for a certain type, one can already use the type class instance for that ...
smheidrich's user avatar
  • 4,628
6 votes
2 answers
164 views

Given the input file: ---------------- A ---------------- information for A on these lines ---------------- B ---------------- Something about B on these lines etc I want to produce: A: information ...
Norman Gaywood's user avatar
0 votes
0 answers
58 views

I am trying to use for loop within the stored procedure to retrieve the employee id and process further but getting an error: Error: SQL Error: Internal jdbc driver error Procedure: create or replace ...
MAK's user avatar
  • 7,345
3 votes
4 answers
126 views

I am trying to perform a loop which loops through a list of single or multiple variables then sums a column. I am essentially trying to paste in from a list into the group_by() function so that it ...
KatChristiansen's user avatar
2 votes
1 answer
86 views

This is a follow-up to a previous question about the jax.lax.fori_loop function, with a little bit of a challenge for you at the end. As described in the documentation, the fori_loop is never executed ...
Ben's user avatar
  • 539
1 vote
1 answer
103 views

I noticed that some software I use, AutoDarkMode, doesn't randomize the first wallpaper it switches to, so I thought I'd write a batch file to do it by copying one wallpaper in the folder and renaming ...
JPrest's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
4805