Data transformation is the process of converting data from one format or structure into another format or structure. This can range from a simple transformation like transforming a comma-separated list to a line-break-separated list to complex transformations like speech-to-text. Strategies and technologies used can vary widely based on the complexity, volume, format and structure of the data being transformed.
Questions tagged [data-transform]
152 questions
1
vote
2 answers
Row values to columns in R
I am new to R and I am trying to build my first regression model. However, I am struggling with transforming my data.
I have my data organized in the following format:
resp_id task_id alt A_1 B_1 C_1 D_1 E_1
1 25 1 3 0.4…
![](../../users/profiles/11582553.webp)
Martijn
- 27
- 4
1
vote
1 answer
Variable that apply only to a subset of the data
I'm using a public dataset available at this link.
It's about marketing, and one of the variables (pdays, numeric) refers to the number of days that passed by after the client was last contacted from a previous campaign.
Rows which the value is 999…
![](../../users/profiles/7065314.webp)
Guilherme
- 300
- 1
- 9
1
vote
2 answers
Converting columns with date in names to separate rows in Python
I already got answer to this question in R, wondering how this can be implemented in Python.
Let's say we have a pandas DataFrame like this:
import pandas as pd
d = pd.DataFrame({'2019Q1':[1], '2019Q2':[2], '2019Q3':[3]})
which displays like this:
…
![](../../users/profiles/5961077.webp)
Mehdi Zare
- 779
- 1
- 7
- 22
1
vote
1 answer
Linear transformation for noisy data in python
I have a dataset that you see below. The data is pretty noisy, but there is a clear linear trend that goes up and to the right. I'd like to transform the data with y = m * x to make the lines horizontal. Essentially, I'd like to do a regression…
![](../../users/profiles/6410450.webp)
Troy D
- 1,243
- 10
- 24
1
vote
1 answer
Transforming two column data in rows to multiple columns in R using tidyr
I'm trying to calculate differences between products and users to use in a recommendation system.
Data is in two column with multiple rows, need to be transformed into rows as users and columns as products.
I tried cast function from reshape package…
![](../../users/profiles/5961077.webp)
Mehdi Zare
- 779
- 1
- 7
- 22
1
vote
1 answer
Merge levels of same variable which are in consecutive columns
I have a csv data file which has 2 headers that means one header as a question and the second one as a sub header which has multiple levels or answers for the main header. Current csv look like below table
Header Which country do you live? …
![](../../users/profiles/6103305.webp)
Jemima Jeyakumar
- 59
- 9
1
vote
1 answer
Concat named list of vectors
I'd trying to figure out how to transform a named list where the values are also list in a named list where the value is the result of a concatenation of the values within a vector.
I do not know if I explain correctly or easily, so follow the…
![](../../users/profiles/9345938.webp)
Aureliano Guedes
- 655
- 4
- 17
1
vote
0 answers
Is it necessary to scale the data after box-cox transformation
I have a problem. When I did regression analysis using SVR with a linear kernel, I found that the dependent(target value) were not normally distributed and had a long tail on the left side. So I used box-cox transformation. Then the visualization of…
![](../../users/profiles/8945210.webp)
Zhang Qing
- 21
- 5
1
vote
1 answer
Bucketing ranks values in r
I am trying to bucket rank values in cycles. From rank 1 to rank 2 is cycle1, similarly from rank 2 to rank 3 is cycle2, so on forth and create binary values for each cycle (as shown below)
Data frame before
id event date…
![](../../users/profiles/9238871.webp)
ajax
- 121
- 10
1
vote
2 answers
combining values in two columns in to a single new column in R
How can i combine two columns such that the value in one column replaces NA in the other column?
Initial dataframe
date1 date2
2016-08-29 02:31:34 NA
NA 2016-08-29 17:59:23
Data frame after…
![](../../users/profiles/9238871.webp)
ajax
- 121
- 10
1
vote
0 answers
AdStock Transformation in R
I am referencing this document here:
https://mpra.ub.uni-muenchen.de/7683/4/Adstock
On Page 6 there is a formula for AdStock Transformation that looks like this:
I found an R code that reproduces this adstock transformation…
![](../../users/profiles/5893585.webp)
nak5120
- 3,410
- 3
- 23
- 62
1
vote
2 answers
Advanced XSLT Transformation for XML to XML Conversion
I have an XML which looks like this:
1
2
3
10
![](../../users/profiles/6615414.webp)
qubiter
- 215
- 1
- 3
- 16
1
vote
0 answers
R basic workflow
I am absolutely new in R,
and my problem is that I do not have any Real World experience in it.
I mean, I have learnt a lot but I am always struggling when I get a new task to deal with.
Generally speaking I am talking about, how to start to deal…
![](../../users/profiles/7185786.webp)
Csaba Csorba
- 53
- 1
- 1
- 6
1
vote
2 answers
How to convert JSON
I have the following JSON data structure:
var data = <%=request.getAttribute("jsondata")%>;
And that is my data:
[
{
"name": "User I/O"
},
{
"key": "61410583140000"
},
{
"value": "125"
},
{
…
![](../../users/profiles/3236180.webp)
farahm
- 1,042
- 3
- 17
- 55
0
votes
1 answer
Identifying matching observations in dyadic data in R
Hell everyone,
I am struggling with the following issue. Currently, I have a dataset looking like this:
living_in from Year stock
Austria Australia 2014 2513
Austria Australia 2013 …
![](../../users/profiles/15093228.webp)
MixedModeler
- 15
- 5