Data & Analysis Prompts
Data prompts for Gemini — spreadsheet formulas, data cleaning, SQL, insight extraction and chart planning.
12 prompts
Complex Conditional Formula Generator
Act as a spreadsheet expert. I need a formula for [SPREADSHEET_APP] to calculate [DESIRED_OUTCOME] based on these conditions: [CONDITIONS]. The formula should handle [DATA_RANGE_REFERENCE] and include [SPECIFIC_FUNCTIONS, e.g., IF, VLOOKUP, INDEX-MATCH]. Use best practices for readability and error handling. Output only the formula with a brief explanation of how it works.
View promptClean Messy Text Columns with Formulas
I have a spreadsheet column containing [DATA_TYPE, e.g., full names, addresses, email addresses] that is inconsistently formatted. Common issues include [LIST_ISSUES, e.g., extra spaces, mixed case, inconsistent separators]. Please provide a set of formulas or functions in [SPREADSHEET_APP] to clean this column, transforming the data into a consistent format: [DESIRED_FORMAT]. Include explanations for each formula step. If a single formula is too complex, break it down into helper columns.
View promptConvert Natural Language to SQL Query
You are a SQL expert. I will provide a description of my database tables and a question. Write a SQL query to answer the question. Use clear aliases, comments, and optimize for readability. Tables: [TABLE_SCHEMAS]. Question: [QUESTION]. Include only the SQL code in your response, with a brief explanation after.
View promptExplain Data Trend or Anomaly
I have a dataset about [DATASET_DESCRIPTION]. I observed a [TREND_OR_ANOMALY] between [TIME_PERIOD_OR_SEGMENT]. My hypothesis is [YOUR_HYPOTHESIS, if any]. Help me interpret this finding. Consider factors such as [RELEVANT_FACTORS]. Provide possible explanations, suggest additional data to analyze, and ask me clarifying questions to narrow down causes.
View promptRecommend Best Chart Type for Data Story
I want to visualize [DATA_MEASUREMENTS] to communicate [STORY_OR_INSIGHT] to an audience of [AUDIENCE_TYPE]. The data includes [VARIABLES, e.g., time, categories, numeric values]. Suggest the most effective chart type(s) in [TOOL_NAME] and explain why. Include tips on chart design such as color, labeling, and avoiding common pitfalls. If a combination chart is better, describe how to set it up.
View promptGenerate Python Data Analysis Script
You are a data analyst Python expert. Write a Python script using pandas and [OTHER_LIBRARIES, e.g., numpy, matplotlib] to perform the following analysis: [ANALYSIS_TASK]. The input data is [DATA_SOURCE, e.g., CSV file path, database], with columns [COLUMN_NAMES_AND_TYPES]. The output should be [OUTPUT_FORMAT, e.g., a summary table, a chart, a cleaned file]. Include comments, error handling, and follow PEP8. Output only the code and a brief explanation.
View promptConvert Spreadsheet Formula Between Apps
I have a formula written for [SOURCE_APP]: [ORIGINAL_FORMULA]. Convert it to work in [TARGET_APP]. Account for differences in function names, syntax, and argument separators. Ensure the converted formula handles same references and logic. Provide the converted formula and note any necessary adjustments.
View promptCustom Data Validation Rule Creator
I need a data validation formula for cells in range [RANGE] in [SPREADSHEET_APP] that enforces this rule: [RULE_DESCRIPTION, e.g., only dates in the future, text of a certain pattern, dependent on another cell]. The validation should show an error message: [ERROR_MESSAGE]. Provide the exact custom formula and step-by-step instructions to set it up.
View promptDesign Pivot Table for Summary Analysis
I have a dataset with columns: [COLUMN_NAMES_AND_EXAMPLES]. I want to analyze [ANALYSIS_GOAL, e.g., sales by region and product category, survey response distribution]. Recommend a pivot table layout using [SPREADSHEET_APP] including rows, columns, values, and filters. Also suggest any calculated fields or custom aggregations. Provide step-by-step instructions and explain why this layout helps achieve the goal.
View promptDiagnose SQL Query Error
I ran this SQL query: [QUERY]. I got error: [ERROR_MESSAGE]. My database is [DATABASE_TYPE]. Explain what caused the error and provide the corrected query. If there are multiple possible issues, list them and suggest fixes for each.
View promptStep-by-Step Data Cleaning Workflow
I have a messy dataset from [SOURCE] containing [DATA_TYPE, e.g., customer records, sales transactions]. Common issues: [ISSUES_LIST]. I need to clean it for [INTENDED_USE, e.g., import into a CRM, analysis in Python]. Outline a step-by-step cleaning workflow using [TOOL_OR_LANGUAGE, e.g., Excel, Python pandas]. Include specific functions or methods to handle each issue, and the expected output format after each step.
View promptGenerate Regex and Extraction Formula
I have a text column in [SPREADSHEET_APP] with entries like [EXAMPLE_TEXT]. I need to extract [PART_TO_EXTRACT, e.g., email domain, phone area code] using a formula. Provide a regular expression pattern that matches this part and a spreadsheet formula using [FUNCTION, e.g., REGEXEXTRACT in Sheets, custom function in Excel]. Include an explanation of the regex components and how to adapt it for variations.
View prompt