I am uploading file so i am trying to pass a filename after looping through but i am getting an unbountLocalerror. i have tried making the filename global so th
I am new to PostgreSQL and am struggling with the creation of a procedure to save the data in a new table. This is how the empty table is created CREATE TABLE e
I have a list with integers, I need to find which item repeat the most, then the function should return two variables (value, number) value is the repeated elem
I have a dataframe that looks like this: df = pd.DataFrame({'col1': [[[1,5,3],[0,0,0]], [[1,2,3],[0,0,0], [1,2,3]]]}) # which looks like this: col1 0 [[1
I have several files like: a.txt a$.txt a$b.txt b.txt b$.txt b$c.txt I would like to print file whose name does not contain '$' using Windows command line fo
for (i in 1:nrow(survey_clean)) { for(j in 1:ncol(survey_clean)) { survey_clean$invalid_answers[i] <- sum(survey_clean$old_col == survey_clean$ol
I am new to Python. I am doing some exercise online. def user_input_checking_even_number_list(user_input_list): for input_number in user_input_list:
Link to HackerRank Challenge My idea is to loop through the array and sum all elements in the array except for one element each time, then find the smallest su
I have a list of disctionary keys ['A_report1', 'A_report2', ..., 'A_report10','B_report1', 'B_report2', ..., 'B_report10',]. I want to extract all 'report1' fr
I want to compare two dataframes with content of 1s and 0s. I run for loops to check every element of the dataframes and at the end, I want to replace the "1" v
I am trying to solve this problem in codility. My solution passed all the tests except for one with empty array and rotation of 1 as arguments. I'm someway lost
Given an unsorted array of size n, write a program to find number of elements between two user-defined elements a and b (where a and b both are inclusive) of a
I want to know which elements of list_1 are in list_2. I need the output as an ordered list of booleans. But I want to avoid for loops, because both lists have
I am trying to pass a Javascript code to Java, but I've got a problem with the for loop, I have a for with 2 iterators in my Javascript code, and it is working
I've got the error message: "Invalid parameter list" from my function, which let Octave open a text file and read it to get input data for my work. function [m
I am using a shared webspace and I can't install the dotenv libiary for php, but I can use the dotenv libiary for python to call enviorment variables from outsi
I am looking to complete this code but cannot get it to execute the right way. The program connects two user-inputted names into one full name and then looks fo
I write a code in python but I faced this error : if a1[i] == a1[i+1] == a1[i+2]: IndexError: list index out of range I write an if condition that if my list l
Link to Codewars challenge This is very basic, but for some reason, I can't figure out why I'm not able to return null when there are not any non-consecutive n
This may sound like a very naive question. However, to me, it's quite fundamental: Can python plot variables without putting them into arrays or lists? I couldn