Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [data-wrangling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Each person gets their top, or second choice of activity over a period of 6 slots

We are running a camp for 130 children, and on 3 days they can pick different activities to do. One activities for slot 1 (45min), the other for slot 2 (another 45min), enabling them to do 6 ...
Pascal's user avatar
  • 9
0 votes
1 answer
31 views

Tool/package for merging tables with inconsistent column names and categorical variable encoding?

I have 10s of spreadsheets with facility-level rows. Each spreadsheet corresponds to a month. They each contain approximately the same variables (10s of them), but often with different column naming ...
katriel's user avatar
  • 111
0 votes
1 answer
1k views

Export pandas dataframe to dictionary as tuple keys and value [closed]

I have a pandas dataframe df that looks like this: col1 col2 col3 A X 1 B Y 2 C Z 3 ...
Scratch's user avatar
2 votes
0 answers
72 views

Dealing with class imbalance in test set

I am building a machine that tries to predict which ISP customers will complain due to issues with the network. I am having some difficulties. The idea is to use network metrics of ~300K customers as ...
Leon's user avatar
  • 133
3 votes
3 answers
1k views

Giving each person in order their top choice which is still available in Google Sheets

The problem I want to solve is my residential building's garage choices. There will be a random distribution of parking spaces. I thought that it would be better if each person writes down which ...
Heleno Paiva's user avatar
1 vote
1 answer
418 views

Data Wrangling and data cleaning

I found some information about Data Wrangling and they say different things. In this one, they say data cleaning is a subcategory of data wrangling link In this PDF, data wrangling is EDA and model ...
Inuraghe's user avatar
  • 481
0 votes
1 answer
45 views

Advantages to combining similarly-named columns for supervised ML?

Is there any benefit to combining similarly named columns either for an improvement in accuracy or for speeding up training/prediction in case of logistic regression, random forest or neural network ...
v81's user avatar
  • 3
0 votes
1 answer
3k views

Filter for top 10 highest values of group in dataset (in R)

Context: I am trying to find the top 10 highest values of count in my data frame conditional on them falling within the years 1970-1979. My data frame looks as below: ...
n.baes's user avatar
  • 39
1 vote
1 answer
330 views

Data cleaning in Pandas, where the csv file has all data of each row in 1 field [closed]

I have really messy data that looks like this: As you can see all the data in each row is contained in 1 column separated by a semi colon. How do I arrange this data so that they are spread out over ...
PlatinumMaths's user avatar
0 votes
1 answer
4k views

Compare multiple values from a DataFrame against a single row from another

I'm trying to compare address values for inaccuracies, for example, given multiple records like: Reference Apartment Address PostCode AS097 NaN 00 Name Road BH1 4HB AS097 Flat 1 Building Name 00 ...
Ricardo Sanchez's user avatar
1 vote
0 answers
22 views

What is a good way to handle nominal spatial data with a changing number of categories to use in prediction model?

For a project I'm going to be working with spatial data with a nominal attribute (land use). Every year the number of categories for this attribute changes because categories split or merge. I do have ...
Nander Vilar Castellar's user avatar
-1 votes
1 answer
38 views

Data wrangling dates

I have a feature with data creation dates. I have normalized them all to the same format and split them to 'day', 'month' and 'year' columns. But now I have a question. Should I apply normalization or ...
Luiscri's user avatar
  • 101
-1 votes
1 answer
30 views

Similar values cleaning [closed]

can someone know algorithm how to identify account names that are similar enough to be potentially merged and imported as one Duplicates with different values: Geico val1 NaN =====>>...
miro_muras's user avatar
1 vote
0 answers
91 views

Issue with miscount on test train split in Python

Problem Hey everyone. I think I am missing something incredibly easy, but because I am wokring in resampling for the first time it is giving me all sorts of inadequacy. I performed an ADASYN up sample ...
ChrisP's user avatar
  • 11
0 votes
1 answer
174 views

Encoding of high cardinality multi-label categorical feature?

This is the problem of binary classification: "1" - the subscriber is a driver (belongs to the segment of drivers), "0" - the subscriber is not a driver (does not belong to the ...
Sviatoslav's user avatar
2 votes
1 answer
158 views

How to preprocess an ordered categorical variable to feed a machine learning algorithm?

I have a categorical variable that measures the income of a family: A: no income B: Up to $500 C: $500-$700 … P: $5000-$6000 Q: More than \\\$6000 It seems odd to ...
marcus's user avatar
  • 21
0 votes
0 answers
218 views

How do I extract album and song titles from this plain text file?

Inspired by topic modeling and clustering analysis of Taylor Swift's lyrics, I want to do the same for the band Nightwish. I scraped Dark Lyrics (see script) for all of their lyrics and saved the ...
ramund's user avatar
  • 101
0 votes
1 answer
1k views

How to obtain unique count of categorical variable based on another categorical variable?

I have a dataframe with date and cat_1 variables among other variables. I want to get number of unique values of ...
user62198's user avatar
  • 1,091
1 vote
1 answer
563 views

Group_by 2 variables and pivot_wider distribution based on 2 others

Performing some calculations on a dataframe and stuck trying to calculate a few percentages. Trying to append 3 additional columns added for %POS/NEG/NEU. E.g., the sum of amount col for all ...
DataGuy23's user avatar
1 vote
0 answers
253 views

Grouping by 2 Columns in R to Sum, Count, Percentage, Weighted mean, mode [closed]

I am trying to use dplyr or data.table to calculate sums, percentages, counts, and weighted means for various sub groups. Each Name can have subgroups High Medium and low, and potentially others, and ...
DataGuy23's user avatar
1 vote
2 answers
235 views

How to make tool that's robust to user-generated typos?

Background: A client is generating datasets (excel files). They asked I make an app to analyze the datasets, e.g. summary tables and figures. I'm doing this in R shiny. Problem: There are many typos ...
R Greg Stacey's user avatar
2 votes
0 answers
253 views

Tools for reading data from large, irregular csv files (aka excel file hell)

I have a csv file with 1000 columns and 50 rows that was collected over a few months. Embedded randomly in the file are ~1000 small datasets with semi-standard formats (some columns differ, so does ...
R Greg Stacey's user avatar
3 votes
0 answers
197 views

How to use zero-inflated negative binomial regression for binary classification task?

I am working on a binary classification problem and I am currently employing XGBoost. The dataset consists of several variables which are count variables. The problem is, these features are highly ...
Rohit Gavval's user avatar
0 votes
3 answers
558 views

Can we use median to replace all the missing values from a column

If we can use the median to replace all of the missing values from a column, then what is the advantage of using median over mean for replacing the missing values in a column with numeric values?
raghav gaur's user avatar
1 vote
3 answers
706 views

How to deal with highly skewed (on counts) dependent variables?

I am working on a binary classification problem and the dataset consists of several variables which are count variables. For example, how many times a customer defaulted on a broadband bill payment in ...
Rohit Gavval's user avatar
4 votes
2 answers
692 views

Data wrangling for a big set of docx files advice!

I'm looking for some advice on a data wrangling problem I'm trying to solve. I've spent a week solid taking different approaches and nothing seems to be quite perfect. Just FYI, this is my first big (...
mess1n's user avatar
  • 41
1 vote
1 answer
112 views

How to run KNN (or other) on nested features? Image metadata

I have looked everywhere and I can't find a straight solution. I have a set of metadata from images and their elements (name, heigh, width, position{top, right}). I ...
Lucas Ariel Enrich's user avatar
1 vote
3 answers
78 views

What is the correct procedure when "joining" data takes ~6 hours?

I am dealing with bike-share data. I have 2 DataFrames: trips_df (subset shown), total entries = ...
Bn.F76's user avatar
  • 195
2 votes
1 answer
218 views

What should I do with the NaN values on this stock quote data?

I concatenated 3 stock quote data-frames all with date-time indexes. However, they differ in starting dates so the resulting data-frame contains NaN values for the stock quotes with more recent ...
Yoyong's user avatar
  • 37
46 votes
9 answers
8k views

How much of data wrangling is a data scientist's job?

I'm currently working as a data scientist at a large company (my first job as a DS, so this question may be a result of my lack of experience). They have a huge backlog of really important data ...
Victor Valente's user avatar
2 votes
1 answer
5k views

R Combine Multiple Rows of DataFrame by creating new columns and union values

I have a dataframe in R that looks like this ...
user avatar
3 votes
2 answers
2k views

Inputting (a lot of )data into a dataframe one row at a time

I'm using python. Some 2D numpy arrays are stored in individual rows of a Series. They are 30x30 images. It looks something like this: ...
Isu Shrestha's user avatar
4 votes
3 answers
529 views

How to deal with count data in random forest

I am working on a classification model where my target class is a biased class with the class shape as 0 1 20694 101 Most of my features are the ...
Tushar Mehta's user avatar
4 votes
2 answers
8k views

Mean across every several rows in pandas

I have a table of features and labels where each row has a time stamp. Labels are categorical. They go in a batch where one label repeats several times. Batches with the same label do not have a ...
Munira's user avatar
  • 167
2 votes
2 answers
7k views

how to calculate number of datapoints within a given time interval?

I have a dataframe with one column which is a timestamp. I have converted that column to a datetime object using pandas to_datetime() method. However what I want is to ...
user62198's user avatar
  • 1,091
2 votes
1 answer
147 views

What is the difference between 'if the data is of good quality' and 'if the data is tidy'?

I'm doing Data Analyst nanodegree from Udacity. I'm confused between the difference even after going through the lecture a few times.
user3508140's user avatar
1 vote
0 answers
30 views

How to work with string data with a lot of NAs in an aggregation task with R

I have recently taken up a data wrangling task and inherited a data from my predecessor which contains keyphrases extracted by hand like the following : ...
A_Koala's user avatar
  • 11
1 vote
1 answer
11k views

removing special character from CSV file

I read my csv file as pandas dataframe. Originally it's a dict with multiple entries per keys. Its looks like this after reading as pandas dataframe: ...
Hazel's user avatar
  • 135
12 votes
4 answers
55k views

Export pandas to dictionary by combining multiple row values

I have a pandas dataframe df that looks like this ...
sfactor's user avatar
  • 223
1 vote
2 answers
772 views

How do I split number string with digit pattern?

I am trying to split number string to two to digit numbers How do I get two different Numbers out that string Example: I want separate two numbers ...
Viz's user avatar
  • 13
3 votes
1 answer
20k views

Populate column based on previous row with a twist

I'm struggling with a Pandas problem. I have the following data. ...
nidkil's user avatar
  • 131
0 votes
1 answer
473 views

Unable to print in Jupyter Notebook using Pandas [closed]

I am doing basic data analysis on an csv file in jupyter notebook def answer_two(): return (df['Gold']-df['Gold.1']).argmax() answer_two The above code ...
Bing's user avatar
  • 111
0 votes
2 answers
104 views

R Programming rearranging rows and colums from timeline data [closed]

I am new to R programming and data analytics. This is probably a trivial question but I could not find an answer. I'm also limited with my ontology of data science and data manipulation. So, I'm not ...
user42173's user avatar
0 votes
2 answers
88 views

Adoptive(Machine wise) ML packages

What kind of Machine Learning/Data Mining packages are available that can easily be scaled on a cluster. For instance H2O is one ...
20-roso's user avatar
  • 680
1 vote
4 answers
3k views

Which one is better performer on wrangling big data, R or Python?

I want to know which language/packages performs better & faster on wrangling big data? R and Python both has packages and libraries for wrangling and cleaning data. But which packages and ...
Abdullah Al Imran's user avatar
2 votes
2 answers
146 views

How do you define the steps to explore the data? [closed]

I'm falling in love with data science and I'm spending a lot of time studying it. It seems that a common data science workflow is: Frame the problem Collect the data Clean the data Work on the data ...
Daniel's user avatar
  • 123
0 votes
2 answers
45 views

Analytics term for turning row values into column names and count its assigned values

Do we have a data mining/analysis term for turning row values into column names and count its assigned values?
SoakingHummer's user avatar
2 votes
2 answers
236 views

Technical name for this data wrangling process? Multiple columns into multi-factor single column

What is the technical name for the following data wrangling process? I want to collapse Table A into Table B. (To make the data suitable for ANOVA.) Table A: ...
thanks_in_advance's user avatar
1 vote
2 answers
35k views

Sum up counts in a data.frame grouped by multiple variables

This is a snippet of the dataset I am currently working on: ...
lupi5's user avatar
  • 55
4 votes
2 answers
18k views

When to choose character instead of factor in R?

I am currently working on a dataset which contains a name attribute, which stands for a person's first name. After reading the csv file with ...
lupi5's user avatar
  • 55