Quadratic Docs
  • Getting started
  • Examples
  • Open Quadratic
  • Quadratic AI
    • Getting started
    • Generate code
    • Generate data
    • Import PDFs
    • Import images
    • Security
  • Connections
    • SQL - getting started
    • PostgreSQL
    • MySQL
    • MS SQL Server
    • Parametrize queries
    • SQL AI assistant
    • Security
    • API requests
    • Request a connection
  • Python
    • Getting started
    • Reference cells
    • Return data to the sheet
    • Packages
    • Make an API request
    • Clean data
    • Charts/visualizations
    • Manipulate data
  • Javascript
    • Getting started
    • Reference cells
    • Return data to the sheet
    • API Requests
    • Charts/visualizations
    • Packages
  • Formulas
    • Getting started
    • AI assistant
    • Reference cells
    • Functions and operators
    • Arrays
    • Criteria
    • Wildcards
  • Spreadsheet
    • Navigating
    • Files
    • Shortcuts
    • Insert/delete rows and columns
    • Data validation
    • Present & share
    • Date-time formatting
    • Browser compatibility
  • Teams
    • Manage your team
    • Private files
    • Collaboration
    • Embedded sheets
  • Import data
    • SQL connections
    • API requests
    • Drag and drop .CSV
    • Drag and drop .Parquet
    • Import Excel files
  • Self hosting
    • Getting started
    • Docker
    • AWS
    • Azure
    • Google Cloud Platform
    • Bring your own AI
    • Other hosting
  • Quadratic for Education
    • Overview
    • Enrolling in the education plan
    • Teachers
    • Students
    • Researchers
    • Education FAQ
  • Company
    • About
    • Quadratic is source available
    • Brand assets
  • GitHub
  • Blog
  • Twitter
  • Discord
Powered by GitBook
On this page
  • 1. Find correlations
  • 2. Basic stats - max, min, mean, selections, etc.
  • 3. DataFrame math
  • 4. Data selections

Was this helpful?

  1. Python

Manipulate data

Perform novel analysis on your data.

PreviousCharts/visualizationsNextGetting started

Last updated 1 year ago

Was this helpful?

Manipulating data in Quadratic is easier than ever as you can view your changes in the sheet in real-time. Here is a non-exhaustive list of ways to manipulate your data in Quadratic:

1. Find correlations

# Get the correlation and show the value in the sheet
data['col1'].corr(data['col2'], method='pearson')

# possible methods: pearson, kendall, spearman 

2. Basic stats - max, min, mean, selections, etc.

Reference:

# Get the max value of a column
df["col1"].max()
# Get the min value of a column
df["col1"].min()
# Get the mean value of a column
df["col1"].mean()
# Get the median value of a column
df["col1"].median()
# Get the skew for all columns
df.skew()
# Count the values in a column
df["col1"].value_counts()
# Get the summary of a column
df["col1"].describe()

3. DataFrame math

Do math on data in the DataFrame. Alternatively, use formulas in the sheet on the values.

# Add, subtract, multiply, divide, etc., will all work on all values in a column
df['col1'] + 1
df['col1'] - 1
df['col1'] * 2
df['col1'] / 2 
# Do any arbitrary math column-wise with the above or do DataFrame-wise via
df + 1 

4. Data selections

Alternatively, cut/copy/paste specific values in the sheet.

# get a column 
df['col1'] 
# get multiple columns 
df[['col1', 'col2']] 
https://pandas.pydata.org/docs/getting_started/intro_tutorials/06_calculate_statistics.html
Find correlations
Basic stats - max, min, average, selections, etc.
DataFrame math
Data selections