iravikr/phi1-numpy-pandas-qlora
Text Generation • Updated
instruction stringclasses 183 values | input stringclasses 1 value | output stringclasses 183 values |
|---|---|---|
Read a CSV file and calculate the mean of the price column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['price'].mean()) | |
Read a CSV file and compute the average age grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['age'].mean()
print(result) | |
Read a CSV file and compute the average score grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['score'].mean()
print(result) | |
Replace negative values with zero in the salary column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['salary'] = np.where(df['salary'] < 0, 0, df['salary'])
print(df) | |
Load a CSV file and filter rows where price is greater than 50 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['price'] > 50]
print(filtered_df) | |
Using numpy, calculate the mean of values in the score column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['score'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and calculate the mean of the score column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['score'].mean()) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Load a CSV file and filter rows where quantity is greater than 18 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['quantity'] > 18]
print(filtered_df) | |
Load a CSV file and filter rows where age is greater than 35 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 35]
print(filtered_df) | |
Load a CSV file and filter rows where age is greater than 46 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 46]
print(filtered_df) | |
Replace negative values with zero in the salary column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['salary'] = np.where(df['salary'] < 0, 0, df['salary'])
print(df) | |
Load a CSV file and filter rows where price is greater than 50 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['price'] > 50]
print(filtered_df) | |
Replace negative values with zero in the age column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['age'] = np.where(df['age'] < 0, 0, df['age'])
print(df) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Read a CSV file and compute the average price grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['price'].mean()
print(result) | |
Load a CSV file and filter rows where score is greater than 18 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['score'] > 18]
print(filtered_df) | |
Load a CSV file and filter rows where age is greater than 15 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 15]
print(filtered_df) | |
Load a CSV file and filter rows where salary is greater than 27 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['salary'] > 27]
print(filtered_df) | |
Using numpy, calculate the mean of values in the price column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['price'].to_numpy()
print(np.mean(values)) | |
Using numpy, calculate the mean of values in the quantity column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['quantity'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and calculate the mean of the salary column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['salary'].mean()) | |
Using numpy, calculate the mean of values in the salary column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['salary'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and compute the average age grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['age'].mean()
print(result) | |
Load a CSV file and filter rows where price is greater than 12 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['price'] > 12]
print(filtered_df) | |
Read a CSV file and calculate the mean of the age column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['age'].mean()) | |
Load a CSV file and filter rows where score is greater than 48 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['score'] > 48]
print(filtered_df) | |
Load a CSV file and filter rows where quantity is greater than 22 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['quantity'] > 22]
print(filtered_df) | |
Read a CSV file and compute the average quantity grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['quantity'].mean()
print(result) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Read a CSV file and compute the average score grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['score'].mean()
print(result) | |
Read a CSV file and compute the average age grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['age'].mean()
print(result) | |
Load a CSV file and filter rows where score is greater than 40 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['score'] > 40]
print(filtered_df) | |
Load a CSV file and filter rows where age is greater than 27 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 27]
print(filtered_df) | |
Read a CSV file and compute the average salary grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['salary'].mean()
print(result) | |
Read a CSV file and calculate the mean of the age column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['age'].mean()) | |
Read a CSV file and calculate the mean of the quantity column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['quantity'].mean()) | |
Using numpy, calculate the mean of values in the quantity column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['quantity'].to_numpy()
print(np.mean(values)) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Load a CSV file and filter rows where quantity is greater than 35 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['quantity'] > 35]
print(filtered_df) | |
Read a CSV file and compute the average score grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['score'].mean()
print(result) | |
Read a CSV file and compute the average age grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['age'].mean()
print(result) | |
Read a CSV file and compute the average age grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['age'].mean()
print(result) | |
Read a CSV file and calculate the mean of the quantity column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['quantity'].mean()) | |
Replace negative values with zero in the salary column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['salary'] = np.where(df['salary'] < 0, 0, df['salary'])
print(df) | |
Load a CSV file and filter rows where salary is greater than 20 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['salary'] > 20]
print(filtered_df) | |
Read a CSV file and calculate the mean of the score column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['score'].mean()) | |
Read a CSV file and compute the average score grouped by region | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('region')['score'].mean()
print(result) | |
Replace negative values with zero in the age column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['age'] = np.where(df['age'] < 0, 0, df['age'])
print(df) | |
Using numpy, calculate the mean of values in the score column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['score'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and compute the average salary grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['salary'].mean()
print(result) | |
Read a CSV file and compute the average age grouped by region | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('region')['age'].mean()
print(result) | |
Load a CSV file and filter rows where age is greater than 36 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 36]
print(filtered_df) | |
Replace negative values with zero in the salary column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['salary'] = np.where(df['salary'] < 0, 0, df['salary'])
print(df) | |
Read a CSV file and calculate the mean of the price column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['price'].mean()) | |
Load a CSV file and filter rows where score is greater than 17 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['score'] > 17]
print(filtered_df) | |
Read a CSV file and compute the average age grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['age'].mean()
print(result) | |
Load a CSV file and filter rows where age is greater than 42 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 42]
print(filtered_df) | |
Read a CSV file and compute the average quantity grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['quantity'].mean()
print(result) | |
Read a CSV file and calculate the mean of the salary column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['salary'].mean()) | |
Using numpy, calculate the mean of values in the score column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['score'].to_numpy()
print(np.mean(values)) | |
Load a CSV file and filter rows where age is greater than 45 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 45]
print(filtered_df) | |
Read a CSV file and compute the average quantity grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['quantity'].mean()
print(result) | |
Replace negative values with zero in the quantity column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['quantity'] = np.where(df['quantity'] < 0, 0, df['quantity'])
print(df) | |
Read a CSV file and calculate the mean of the score column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['score'].mean()) | |
Read a CSV file and compute the average score grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['score'].mean()
print(result) | |
Load a CSV file and filter rows where quantity is greater than 20 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['quantity'] > 20]
print(filtered_df) | |
Using numpy, calculate the mean of values in the score column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['score'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and compute the average price grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['price'].mean()
print(result) | |
Load a CSV file and filter rows where score is greater than 22 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['score'] > 22]
print(filtered_df) | |
Replace negative values with zero in the age column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['age'] = np.where(df['age'] < 0, 0, df['age'])
print(df) | |
Load a CSV file and filter rows where salary is greater than 19 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['salary'] > 19]
print(filtered_df) | |
Read a CSV file and compute the average score grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['score'].mean()
print(result) | |
Using numpy, calculate the mean of values in the quantity column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['quantity'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and compute the average price grouped by department | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('department')['price'].mean()
print(result) | |
Read a CSV file and calculate the mean of the salary column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['salary'].mean()) | |
Read a CSV file and calculate the mean of the age column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['age'].mean()) | |
Using numpy, calculate the mean of values in the salary column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['salary'].to_numpy()
print(np.mean(values)) | |
Replace negative values with zero in the age column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['age'] = np.where(df['age'] < 0, 0, df['age'])
print(df) | |
Using numpy, calculate the mean of values in the price column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['price'].to_numpy()
print(np.mean(values)) | |
Read a CSV file and compute the average age grouped by region | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('region')['age'].mean()
print(result) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Using numpy, calculate the mean of values in the quantity column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['quantity'].to_numpy()
print(np.mean(values)) | |
Replace negative values with zero in the quantity column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['quantity'] = np.where(df['quantity'] < 0, 0, df['quantity'])
print(df) | |
Load a CSV file and filter rows where salary is greater than 21 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['salary'] > 21]
print(filtered_df) | |
Load a CSV file and filter rows where quantity is greater than 28 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['quantity'] > 28]
print(filtered_df) | |
Replace negative values with zero in the price column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['price'] = np.where(df['price'] < 0, 0, df['price'])
print(df) | |
Read a CSV file and calculate the mean of the quantity column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['quantity'].mean()) | |
Read a CSV file and calculate the mean of the salary column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['salary'].mean()) | |
Load a CSV file and filter rows where age is greater than 50 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['age'] > 50]
print(filtered_df) | |
Using numpy, calculate the mean of values in the price column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['price'].to_numpy()
print(np.mean(values)) | |
Load a CSV file and filter rows where salary is greater than 42 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['salary'] > 42]
print(filtered_df) | |
Read a CSV file and compute the average price grouped by region | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('region')['price'].mean()
print(result) | |
Replace negative values with zero in the age column using numpy and pandas | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
df['age'] = np.where(df['age'] < 0, 0, df['age'])
print(df) | |
Using numpy, calculate the mean of values in the quantity column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['quantity'].to_numpy()
print(np.mean(values)) | |
Using numpy, calculate the mean of values in the score column from a CSV file | import pandas as pd
import numpy as np
df = pd.read_csv('data.csv')
values = df['score'].to_numpy()
print(np.mean(values)) | |
Load a CSV file and filter rows where price is greater than 42 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['price'] > 42]
print(filtered_df) | |
Read a CSV file and calculate the mean of the salary column | import pandas as pd
df = pd.read_csv('data.csv')
print(df['salary'].mean()) | |
Load a CSV file and filter rows where price is greater than 33 | import pandas as pd
df = pd.read_csv('data.csv')
filtered_df = df[df['price'] > 33]
print(filtered_df) | |
Read a CSV file and compute the average quantity grouped by category | import pandas as pd
df = pd.read_csv('data.csv')
result = df.groupby('category')['quantity'].mean()
print(result) |