Phrazor SDK
Get API KeyPhrazor API
  • 👋Welcome
  • Docs
    • ⚡Quick Start
    • 🔑Get your API Key
    • Documentation
      • 📥Download and Import
      • 🔗Connect your Data
      • 🛠️Setup your Analysis
        • Descriptor
        • Change
        • Trend
        • Compare
        • Target vs Achievement
        • Budget vs Expense
        • Others
          • Filter your Data
      • 📋Generate your Insights
      • 📝Generate your Summary
      • 🔌Integrations
      • 💣Rate Limits
Powered by GitBook
On this page
  • 1. Set Data from JSON
  • 2. Set Data from CSV File
  1. Docs
  2. Documentation

Connect your Data

Explains how to set up and import data into the library.

This is where Phrazor allows you to provide data for analysis in two different ways. You can either directly pass data as a JSON or load data from a CSV file.

1. Set Data from JSON

You can set data by passing a JSON where keys represent column names, and values are lists of corresponding values. This method is useful when you have your data readily available in your Python script.

# Example of setting data from JSON
data = {
    "City": ["All India", "Delhi", "Karnataka", ...],
    "Brand": ["Nokia", "Samsung", "Apple", ...],
    "Sales": [100000, 90000, 40000],
    "Quantity": [500, 350, 200],
    "Date": ["2023-01-01T10:00:00", "2023-01-01T10:15:00", "2023-01-01T10:30:00"]
}

phrzr.set_data(data)

2. Set Data from CSV File

Alternatively, you can set data by loading it from a CSV file. Specify the path of the CSV file using the set_data method and set the is_csv parameter to True. This method is useful when you have a large dataset stored in a CSV file.

# Example of setting data from a CSV file
csv_file_path = 'YOUR DATA PATH'
phrzr.set_data(csv_file_path, is_csv=True)

Replace 'YOUR DATA PATH' with the actual path of your CSV file.

These two methods provide flexibility in setting your data for analysis, allowing you to choose the approach that best suits your data source and workflow.

For the community cloud we have limited the number of data cells to 100000.

Please take note that the Date Column should contain values in the YYYY-MM-DD format and should not contain null values.

PreviousDownload and ImportNextSetup your Analysis

Last updated 1 year ago

🔗