Visit the official Paxata Documentation portal for all of your doc needs.

Shaping Overview

AkshayAkshay Posts: 94 admin
edited October 25, 2018 2:29AM in Paxata Fundamentals
For in depth information regarding the use of shaping operations within Paxata, click the links below:

Deduplicate
The Deduplicate function searches your data for rows that match each other exactly, and condenses them into a single row, removing duplicate entries from your data.

Group By
This function allows for the user to utilize a number of different aggregate functions (listed below) on any of the existing columns within the dataset.

Transpose
Transpose is the simplest of the Shape functions, essentially allowing you to switch your rows and columns (imagine rotating your data 90 degrees).

Pivot
Pivot is similar to transpose in that it allows you to rearrange your column headers into row headers; but, it also allows you to perform aggregate functions on selected columns to be displayed as the body of data within your pivot table.

Depivot
The Depivot function is a very powerful function that allows you to take your data and stack columns into two columns (one column containing the Column headers that the original data came from, a second column containing the value from that column).

Comments

  • junojuno Posts: 5
    edited May 10, 2019 2:11AM
    How can I order the pivot column?
    Example) Pivot Column A order by ColumnB
  • MK_CSMK_CS Posts: 1 mod
    I have the same question about Juno's question. To explain this in more detail

    For example,
    Column 1 : b c a
    Column 2 : 2 1 3
    What we want to do is to sort the columns by 'c b a' if we rotate the pivot with the sorting criteria of column 2 (1 2 3).

    Currently, when we pivot, it sort the columns at random by default, .
  • Hello Juno, MK_CS,

    Please bear with me. Hopefully, this will answer the actual question but let me know if I have misunderstood.


    Considering the following dataset:



    Where the data is unsorted but I want to pivot the second column in such a way that the headers resulting from the pivot would be ordered.

    To achieve this I need to add a step that allows sorting of the data, the easiest one to use is the Auto # step.

    Adding this step:



    You can name this step whatever you want as we will not be using this in the shaping operation, this is only to force a sort. Notice that this step is sorted by col2:



    Now I can do my shaping as I would normally do:



    Notice that my headers are properly sorted.

    In case I have misunderstood the original question and you want to sort col1 instead of col2 then simply change the Auto # step to sort by col1 and update the shaping step (click on it to refresh it).

    Let me know if this answers your question.
Sign In or Register to comment.