Utilizing AI in Data Management

A couple of months ago, our AI in Medicine (AIM) interest group at GW hosted a fantastic workshop on leveraging AI for data cleaning, visualization, and analysis. Big shoutout to the AIM leadership: Shakthi Ramasamy, Will Randall, Kevin Rao, Nene Okolo, Arjun Moorthy, and Rohith Pydi for putting it together!

Before med school, I worked as a data analyst at a clinical research organization, and I genuinely wish I had known these tools back then. While I’ve used Excel and Google Sheets extensively, I don’t have formal coding experience. I'd describe myself more as a curious learner than an expert when it comes to AI.

The workshop introduced us to Google Colab, a free, cloud-based platform that lets users write and execute Python code directly in their web browser. Colab uses Gemini as an LLM assistant that can help generate code from natural language prompts. You can ask it questions, give it tasks, and upload files such as photos and spreadsheets. Here's a snapshot of what we learned:


🛠️ What You Can Do

Prompts with Gemini will output code cells that you can run to perform tasks such as:

  • Load and explore data
    “Load this spreadsheet, tell me how big it is, and show the first 10 rows.”

  • Clean or alter data
    “Change Diabetes Status of 0.0 to ‘No Diabetes’, 1.0 to ‘Pre-diabetes’, and 2.0 to ‘Diabetes’.”

  • Visualize data
    “Make a bar chart of diabetes status vs. BMI with standard deviation bars.”

  • Run statistical analysis
    “Perform a one-way ANOVA to determine if BMI is associated with diabetes status.”

  • Export results
    “Provide me the updated Excel file.”



🧠 Tips for Working with Gemini

Code isn’t always perfect on the first try, but Gemini can help you debug it. A few things I found helpful:

  • Be specific with prompts, but avoid redundancy. If you're not sure how to phrase something, you may ask additional questions, such as:
    “What type of statistical test would you recommend for __?”

  • Ask Gemini to explain code line-by-line to build your understanding and catch logic issues early.

  • Use error messages to guide your debugging, and prompt Gemini to revise its own code accordingly.

  • If things go sideways, backtrack, delete broken cells, and try a fresh start with a refined prompt.



⚠️ Things to Keep in Mind

  • You can change the runtime type so Colab produces and runs code in R if you prefer more customization or already have R experience.

  • Deidentify all data before uploading to Colab — by default, it’s not HIPAA compliant. If handling PHI is unavoidable, you may need to explore a Business Associate Agreement (BAA) with Google Cloud to start.

  • Always back up your files, and save documentation of any code used to transform or analyze data. AI can make mistakes!



It’s exciting to see tools like these making complex tasks more accessible to non-programmers. If you're even a little curious, I definitely recommend giving it a try!