Questions tagged [data-handling]
60 questions
0
votes
0 answers
group a column of dataframe based on another column of maximum k size?
I have a movie rating/watchedenter code here dataset with columns userid, movieId and timestamp.
I want to groupby the dataframe according to the users and each row should contain the movies not more than a certain time (lets say 500 in my case )…

NITISH PANDEY
- 165
- 7
0
votes
1 answer
Swift - Creating a stack (Text view) from a function that returns an array
I am trying to create a list of text objects out of a function that returns an array of params. Everything seems to be working fine, getting the data, console shows the correct results, except the list itself which remains empty.
The function…

Saisuk
- 5
- 2
0
votes
0 answers
Initialize variable with previously declare object value
I want to initialise selectedElement with the id of the elements object in vuejs.
This is not working:
data() {
return {
elements: [
{ id: 0, name: 'Simple elements' },
{ id: 1, name: 'Call to action' },
],
selectedElement:…

lopezi
- 537
- 2
- 7
- 20
0
votes
2 answers
Handling client information on database
I have an escenario i would like to discuss.
If i had a web app shared by several clients, everyone with their own database. In some time a client will report an error. How would it be the best way to handle this data?. Because im thinking on…

blinding
- 3
- 4
0
votes
1 answer
Grouping regions according to area codes in statistical program R
I want to create an area group according to the areacode.
By doing this, all area_g becomes A.
Only codes 50110250, 50110253, 50110310 should be A!
and 50110101~50110140 should be 'B'.
what's wrong...
This is the code I wrote. Thank you.
AAA <-…

nini
- 11
- 3
0
votes
1 answer
How do I assign group level value - based on row level values - to df using dplyr
I have the following decision rules:
RELIABILITY LEVEL DESCRIPTION
LEVEL I Multiple regression
LEVEL II Multiple regression + mechanisms specified (all interest variables)
LEVEL III Multiple regression +…

DeMelkbroer
- 629
- 1
- 6
- 21
0
votes
2 answers
how to implement update button for datagridview and save values to database using a dataHandler class(data access class) c#
good day, hope everyone is well :)
I'm a first year student, and we just started with windows forms. I want to update data from DataGridview into my database using a button but I have to create an update method in a data handler class and call it in…

casey mali
- 11
0
votes
1 answer
How do I write a function to delete a record from a binary file using pickle?
I am storing the records in form of a list.
Write a menu driven program to append, display and delete student
details [id, name, percentage] in a binary file. Deletion should be
done on the basis of student id.
So I wrote this:
#Code to append…

kiddo42069
- 9
- 3
0
votes
0 answers
How to read an integer/double data type from a .dat file?
How to read integer/double data type from a .dat file ? I used a Java program to creat a binary file and wrote an int data into it and now I am trying to open the file using Notepad/MS Word it's showing the character equivalent as ASCII value of the…
0
votes
1 answer
How to proceed after annotating text data for ML?
I am currently working on a project where I want to classify some text. For that, I first had to annotate text data. I did it using a web tool and have now the corresponding json file (containing the annotations) and the plain txt files (containing…

Chipi
- 17
- 5
0
votes
1 answer
How to deal with missing values in Real-Estate data?
I am working with properties dataset and I am trying to deal with missing values in Land Square Feet Column. There are almost 160000 records in the dataset. Out of which 70000 records have missing LandSquareFeet. I also have a feature which tells…

Poo
- 107
- 9
0
votes
1 answer
Pivot table error "Can't assign to operator"
I get this error when running the code below 'Can't assign to operator'
df_2 = pd.pivot_table(df, index = df.columns[~df.columns.str.startswith('A')],
values = df.columns[ df.columns.str.startswith('A')])
I want to…

nielsen
- 383
- 1
- 6
0
votes
1 answer
How to create an ID that increases by 1 every time the previous row of another column is 1
Working with Python, I need to create two new variables.
One (See JourneyID in example) that cummulatively increases by one each time the previous row of another column takes the value '1', and
One (See JourneyN in example) that cummulatively…

nielsen
- 383
- 1
- 6
0
votes
1 answer
Convert data types in pandas and removing unnecessary rows
I'd like to drop unnecessary rows in a file, but the data types in my raw data is stated as object.
I've tried to convert it using the .astype however it did not seem to work.
df = pd.read_csv(raw_data, header=None)
print(df.dtypes) headers =…

pradinipus
- 11
- 3
0
votes
3 answers
How to convert this vertical dataset to horizontal dataset?
I wanna change this data set:
id PTMIINDT PTMIINTM DGOTDIAG DGOTDGGB
1: ys00000001 20160101 614 R060 1
2: ys00000002 20160101 640 S0090 1
3: ys00000002 20160101 640 A090 2
4: ys00000003 20160101…

johnson kim
- 1
- 1