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
votes
1 answer
Transfer table from vertical to horizontal in sql
I want to transfer table from
to what looks like this:
Not sure how to approach?
Code I had is this
FROM TABLE A,
(SELECT PART_NO, SUM(QUANTITY) AS Type_1
FROM TABLE
WHERE STYPE = 'Type_1'
GROUP BY PART_NO, STYPE) B,
(SELECT PART_NO,…
-1
votes
2 answers
Transpose Dataframe problem: For each df.index and df.column combination create a row in new dataframe
I have a data frame that looks like this:
The index of my data frame is the "Dates" column.
Dates 3M INDIA LTD ALKYL AMINES CHEMICALS LTD AAVAS FINANCIERS LTD ABB INDIA LTD ADITYA BIRLA CAPITAL LTD
01-01-2020 1.738819 -0.054496 …
sachin kumar s
- 67
- 10
-1
votes
1 answer
python split string json into multiple variables and create dataframes
Below is my string in python3
Please assume below string is in a loop
On First loop I get below string string as input
string='{a:1,b:1}{a:2,b:2}{a:3,b:4}'
On Second loop I get below string as input
string='{a:1,b:6}{a:2,b:6}'
On each loop pandas…
Naveen Srikanth
- 529
- 2
- 6
- 17
-1
votes
1 answer
Understanding the percent change effect after applying MinMaxScaler?
I wanted to know if the percent change between two values remains the same after scaling the data using MinMaxScaler from scikitlearn.
If not which scaling method should I use in order to make sure that the percentage change remains the same after…
Jash
- 37
- 7
-1
votes
1 answer
For every row, I want to make first row of every column as a new row
I am working with Python Pandas and I have a following table that consists of many rows:
Date X X Date Y Y
0 2014-03-31- 0.390- 2014-04-24- 1.80
1 2014-04-01- 0.385- 2014-04-25- 1.75
What I want to do is for every…
a_zh
- 1
-1
votes
3 answers
Search and format the string
Here is my data at below,
So in my activity description column I have many charges.
Some string contain pattern like charge, charges, or nothing.
So at first,
1. I need to find for pattern named charge and replace with charges.
But for 2 of the…
krishna31
- 113
- 1
- 9
-1
votes
3 answers
Creating a new column using existing values from other columns using R
I am trying to calculate weight loss over period of time, therefore the initial weight is quite important. I want to create a column 'Initial weight' based on the weight at 'Day'=0 for each tray. Example is below:
Day Tray Weight Initial…
Leo
- 13
- 1
-1
votes
2 answers
Data Transformation / Preparation
I'm beginner in Python. In order to perform data mining, I would like to transform a raw dataset:
PurchaseLine01 PurchaseLine02 PurchaseLine03 PurchaseLine04
milk egg sausage
butter water
egg …
Krukiou
- 111
- 10
-1
votes
2 answers
Merge and fill different length data in R
I'm using R and need merge data with different lenghts
Following this dataset
> means2012
# A tibble: 232 x 2
exporter eci
1 ABW 0.235
2 AFG -0.850
3 AGO -1.40
4 AIA 1.34
5 ALB -0.480
6…
Adilson V Casula
- 157
- 14
-1
votes
1 answer
Using self-defined data transform function in Spark Structured Stream
I read the following blog and find the API is very useful.
https://databricks.com/blog/2017/02/23/working-complex-data-formats-structured-streaming-apache-spark-2-1.html
In the blog, there are lots of data selection example. Like using input
{
…
DeepNightTwo
- 4,351
- 7
- 42
- 57
-2
votes
1 answer
Transforming the text file using dataframe
List of countries:
'Algeria','Angola','Argentina','Australia','Austria','Bahamas','Bangladesh','Belarus','Belgium','Bhutan','Brazil','Bulgaria','Cambodia','Cameroon','Chile','China','Colombia','Cyprus','Denmark','El…
Mam1004
- 51
- 7
-2
votes
1 answer
python string find and look up on string until found space from json
Below is my data.
'{"Data": {"a":5647953897,"b":"323299901059958183671030","c":1605858513465}}{"Data": {"a":5647953897,"b":"323299901059958183671030","c":1605858513465}}'
My output should be as…
Naveen Srikanth
- 529
- 2
- 6
- 17
-2
votes
1 answer
Aggregating data in R based on the contents of various columns
I have some data like so, that I have loaded into R
Data column 1, Data column 2,option1, option2, option 3.
23, 45.6 , ,option2, option3
5, 30.6 ,option1,option2,
2, 5 , ,,…
Oliver Stieber
- 1
- 2
-2
votes
2 answers
Create new Column in Power Bi with RegEx
I'm relatively new to Power BI and want to generate a new one based on a column. The contents of the new column should be based on the first value of another column. For example:
ColumnA NewColumn
1123 Argentinia
5644 Brazil
5555 Brazil
3334…
Tim1234
- 363
- 2
- 14
-3
votes
1 answer
Multiply columns of different dataframes having the same name
I have two dataframes which have different no of rows and columns but have few columns with same names. I want to create a dataframe which has the common columns and the columns with same name have their values multiplied. I want it in a way where I…
Ankit Daimary
- 100
- 1
- 6