0% found this document useful (0 votes)
4 views1 page

Prompts For Python Coding

The document provides a list of prompts for using an AI Assistant in Python coding tasks. It includes examples for fixing coding errors, solving programming problems, renaming variables, modifying functions, understanding code, adding comments, streamlining code, cleaning datasets, and creating visual representations of data. Each prompt is designed to facilitate specific coding requests and enhance programming efficiency.

Uploaded by

gaonkarmadhav450
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Prompts For Python Coding

The document provides a list of prompts for using an AI Assistant in Python coding tasks. It includes examples for fixing coding errors, solving programming problems, renaming variables, modifying functions, understanding code, adding comments, streamlining code, cleaning datasets, and creating visual representations of data. Each prompt is designed to facilitate specific coding requests and enhance programming efficiency.

Uploaded by

gaonkarmadhav450
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Prompts for Python Coding

What are we asking the AI Assistant to help us with? Option / Example


Help fix a coding error, and provide options Run code in Notebook
to run or copy the code provided by the AI. Debug the active
code cell Copy

Solve a specific programming problem: “Create a function that takes a list object as

task it with a clear and concise challenge a parameter and that counts the number of
values in it that are smaller than 20.”

Rename object names in code “Rename function to ‘count’.”


(provided by either you or the AI)

Address multiple modifications with a single request “Change the iterator variable name to
x and the ‘count’ variable to ‘total’.”

Modify a function you have already created “Create a function that has the same purpose and
instead of starting from scratch structure, but that uses a ‘while’ instead of a ‘for’ loop?”

Understand a given piece of code Explain the selected code

Run code in Notebook


Add comments to a given piece of code, with options Add comments to
to run, apply, or copy the code received from the AI the selected code Replace Selection
Copy

Streamline code by removing unnecessary


components and receiving suggestions for Refactor the selected code
alternative tools to enhance performance

Clean a dataset you have uploaded (e.g. the lending


company data uploaded from a *.csv file into a “Clean the df_lending_company dataset.”
DataFrame named df_lending_company)

C reate a visual representation of two columns from “Plot the ‘AmtPaid60’ against the ‘Deposit’ for all records
your dataset (e.g. "AmtPaid60" and "Deposit") while containing no missing values in the relevant two columns.”
in the data analysis stage

You might also like