Questions tagged [data-handling]

60 questions
0
votes
2 answers

How to use function inside for loop of another function into python

I want to use function inside function but I get error I want to get previous object,current object and next object how can I define that can anyone help me ? Actually I am new into the programming Thank you in advance class DataHandler: def…
Rin
  • 81
  • 1
  • 2
  • 11
0
votes
1 answer

Insert rows corresponding to each month in an yearly data

I have a dataframe with yearly data from 2014 to 2018. I wish to expand this dataframe into monthly values and basically divide each variable's value by 12 as each month's value. Please note: There is no month column in my dataframe as of now. So,…
user10579790
  • 333
  • 1
  • 10
0
votes
1 answer

How to prepare content before it is even viewed?

I have an app like snapchat. On one table VC I fetch all the media 1 (first media) then when you tap on one of the media, I take you to table VC 2 where I format the data that came with the snapshot in table VC 1 (I save a snapshot to a post…
user11182249
0
votes
1 answer

How to count number of rows based on a certain value in a panel data set?

I am handling a panel data like df. So I have a unique UserID (Uid), a TimeVariable (TV) and my main variable of interest(MV, dummy coded). Each row represents a unique UiD TV combination. Now I want to create a new variable (NV), which counts…
ReLa
  • 33
  • 3
0
votes
1 answer

How 7 is the right answer and not 6 in this output

Assume that the file SCHOOLS.DAT is created with the help of objects of class SCHOOLS, which is defined below: class SCHOOLS class SCHOOLS { int SCode; // School Code char SName[20]; // School Name int NOT; // Number of Teachers in the…
Suraj Giri
  • 202
  • 1
  • 13
0
votes
1 answer

Determine datatypes of columns - SQL selection

Is it possible to determine the type of data of each column after a SQL selection, based on received results? I know it is possible though information_schema.columns, but the data I receive comes from multiple tables and is joint together and the…
JesseB1234
  • 147
  • 7
0
votes
0 answers

get every season data from serveral years data

I'm using python and trying to calculate trends of SIC of different season. So i need to cut every season from all the months from 1979 to 2009 print sic.shape (372, 180, 360) sics=sic[90,:,:] sicm=[] for i in range(0,12): sicj=sic[i::12,:,:] …
Yuhang Pan
  • 35
  • 1
  • 1
  • 6
0
votes
1 answer

left join with for loop

I need answer for no fac date count 1 fac1 2015-01 3 2 fac1 2016-01 5 3 fac1 2017-01 7 4 fac2 2015-01 9 5 fac2 2017-01 11 6 fac3 2016-01 13 7 fac4 2015-01 15 8 fac5 2017-01 17 To make date fac1 fac2 fac3 fac4 fac5 2015-01 3 9 0 15 …
Ray HS Jo
  • 25
  • 6
0
votes
6 answers

Is reading into uninitialized memory space ALWAYS ill advised?

I am recreating the entire standard C library and I'm working on an implementation for strlen that I would like to be the basis of all my other str functions. My current implementation is as follows: int ft_strlen(char const *str) { int…
MJHd
  • 166
  • 1
  • 10
0
votes
1 answer

Issue with importing two columns in a CSV file to two different arrays

Currently been working on a battleships code for my project for advanced higher computing and I'm at the last hurdle. I am trying to import a CSV file named "leaderboard.csv" which contains two columns with set headers in the csv file (Names and…
-1
votes
1 answer

How to push the dynamo db data object into associative array in nodejs serverless dynamodb

i need the below array format data in nodejs serverless Dynamodb i need my output like the below json format how to i get it the format "user": { "e8de014a-22c1-12bf-4653-577c8031138":{ "email": "mailto:rajm@gm.com", "method": [ "email" …
-1
votes
1 answer

Extracting the numbers of two elements which their sum is equal to their multiplication

we have array A that has N len(N = the len of the array) I have to found the numbers of pairs (J, I) that work on the following statement: A[J]+A[I} == A[J] * A[I] 1<=i, j<=N (1 ≤ N ≤ 40000) (0 ≤ A(i) ≤ 10^9) example: input: 3 2 4…
-1
votes
1 answer

For every unit increase in one column value , another column entries increase

I have a simulation dataset with 500 replicates - each replicate contains 300 ids. When rep = 1, id ranges from 1-300; when rep = 2, id again ranges from 1-300 and so on. I want to get the following: when rep = 1: id 1-300; when rep = 2: id 301-600…
-1
votes
1 answer

How can i import the data from dataset of images when i have given a Zip file of type Gz file. an i have already extracted?

i am working on a new assingment where i have asked to bulit a CNN classification model .how to handel when data is given in Gz file type and have diffent folders with images. Before now have only worked on csv type file but currently i am not able…
-3
votes
1 answer

How do I preprocess my data when I have too much but need it all?

I am literally months out of college with a CS BS and my boss is having me build a machine learning agent to classify data into 23 categories from scratch all by myself in two months. I took a single Intro to AI class, and we didn't even cover…
1 2 3
4