Refactor Code
I want you to act as a software developer. Can you refactor the following code for me? [Insert code here]
I want you to act as a software developer. Can you refactor the following code for me? [Insert code here]
I want you to act as a code optimizer. Can you optimize the following numpy code? [Insert code here]
Assume you are a Python developer. Can you develop a script that removes special characters and symbols from a given dataset?
I want you to act as a code optimizer. The following code is taking a long time to run. Can you parallelize it for me? [Insert code here]
I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to normalize the data by scaling each feature to have zero mean and unit variance.
I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to calculate the percentage change of the target variable over a window of n days.
I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to create lagged variables of the target variable for n periods.
I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to calculate a moving average of the target variable over a window of n days.
I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to filter the data based on certain criteria, such as a range of values or a specific category.
I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to group the data by one or more columns and calculate summary statistics such as count, mean, median, etc.