PromptBase
Close icon
General
Home
Marketplace
Hire
Create
Login
Sell
Explore
🤖 GPT

Clean Data As A Data Analyst

Clean Data As A Data Analyst gpt prompt mini thumbnail
2Heart icon
Favorites
73Eye icon
Views
GPT-3.5-TURBO
TestedTick icon
TipsTick icon
This prompt help's you to clean your data in a huge amount of data set fast and clear.
...more
$3.99
Get prompt
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
Over 1 month ago

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
59 ($0.00010 / call)
Example input
I want you to act as a data analyst. I have a dataset of [name of data set]. My dataset have such columns [put the names of you column1], [put the names of you column2], [put the names of you column3], etc. Please write python code to clean the data by removing missing values, duplicates, and outliers.
Example output
import pandas as pd import numpy as np import seaborn as sns # Load the dataset df = pd.read_csv('reference_channels.csv') # Check for missing values print('Missing values before cleaning:\n', df.isnull().sum()) # Drop missing values df.dropna(inplace=True) # Check for duplicates print('Number of duplicates before cleaning:', df.duplicated().sum()) # Drop duplicates df.drop_duplicates(inplace=True) # Identify and remove outliers using z-score outliers = np.abs(df['MKT_TAG'] - df['MKT_TAG'].mean()) / df['MKT_TAG'].std() > 3 df = df[~outliers] # Check for missing values after cleaning print('Missing values after cleaning:\n', df.isnull().sum())
Browse Marketplace