ChatGPT for Data Science: 9 tips

ChatGPT for Data Science: 9 tips 

By now, we assume that most people have heard about ChatGPT in some way or form. According to Statista, ChatGPT reached one million users in just 5 days. In comparison, it took Facebook 10 months to reach this number of users when it launched in 2004. ChatGPT – and other Large Language Models (LLM) – can boost your creativity in so many ways besides writing love letters or doing homework. More specifically, it can do a lot for us developers, AI engineers, data scientists and even hobby programmers. Below you’ll find a list of 9 topics in which ChatGPT help in making our lives much easier. 

1. Code generation 

Let’s face it, a good programmer is often a lazy programmer. The main goal is not reinventing the wheel all the time but going through the mindboggling dull tasks as quickly as possible. In this way, we save time and effort to focus on problem solving, look for patterns and be creative. Websites such as stackoverflow and github have been around for years to help you with your daily struggles. ChatGPT quickly became the popular new kid on the block and form an extra tool in our daily toolkit. 

  • Writing code 

  • Code explanation

  • Model training

  • Write regular expressions

  • Code optimization

2. Debugging

Debugging your code can be a complex and nerve wrecking task from time to time. More often than not your code will not run the first time you try to execute it. You might stumble upon situations, in which there is no colleague at hand to help you and your integrated development environment (IDE) – such as VS Code – isn’t helping either. ChatGPT can point you in the right direction, by prompting the error message, your piece of code or a combination of both. In addition, new programmers might learn a thing or two by encouraging ChatGPT to ask questions in return to gather information from you.

3. Automated testing

Writing (unit) tests can be a tedious time-consuming task for most developers, but at the same time it facilitates robustness by identifying – and ultimately fixing – issues and defects in your code. ChatGPT can be your personal test-assistant by generating test cases, while you save time to focus on more complex testing issues such as integration, penetration and manual testing.

  • With function

  • Without function

4. Explanation

Some models or concepts are just very hard to grasp, let alone explain to a non-technical audience. ChatGPT can help you describe even the most complex stuff into plain English or any other language. You can even mention the specific audience or add an example to the mix. Aside from using these techniques in your presentations or reporting, we could use the same technique for clear code documentation for us developers. It is often an overlooked aspect of coding, but extremely important in handing over both work and knowledge to others.

5. Language translation

Say that you have been tasked with maintaining an R model, but you haven’t used the language in ages. What do you? You could open some old R scripts and figure it out yourself eventually. Or you could simply ask ChatGPT to help and translate your Python code into R. Besides the latter two examples, ChatGPT can help you with a plethora of other programming languages, even hard-to-learn ones like Prolog and Haskell.

Skilled programmers can use this functionality to bring already learned skills back to the surface or kickstart a whole new skillset of languages. Soaking in the thorough explanation provided by ChatGPT is a key aspect here; simply copy-pasting pieces of code isn’t boosting any of your skills.

6. Query generation

Sometimes you stumble across a problem where you know what to retrieve from a database with natural language, but you do not know how to translate that into an, for example, SQL-flavored query. ChatGPT has been trained to transform natural language sentences into multiple query languages such as SQL, MongoDB, ElasticSearch and Neo4j to name a few.

7. Data generation

Dummy data is essential for testing purposes and algorithm optimization. By simulating scenarios through sample data, one can detect potential issues for improvement. Furthermore, AI engineers and data scientists often need sample data to train and evaluate their models. ChatGPT is trained on tons of real-life data, thus it accommodates meaningful patterns. In return, using ChatGPT does not only save lots of time and effort, but also helps in tweaking your columns in such a way that it closely resembles real-life data. The latter which isn’t always provided by clients and organizations.

  • Fill a dataframe

  • Chatbot intent training utterances

8. Data visualization

Data storytelling is one of the key aspects that facilitates understanding both data analyses and model outcomes. To make sense of data, you could use visualizations to tell your story. In the same vein as model explanation, you could use ChatGPT to kickstart your visual narrative using natural language. What is left for you to do? Connect the data and tweak the visuals in such a way that it tells your story.

  • Coding visuals

  • Dashboarding visuals

9. Summarization

Summarizing large chunks of data is crucial in extracting meaningful information. As data scientists and developers, we need to transfer complex analyses to businesses and organizations. As such, summarization helps facilitating decision making and interpretation. You could use this technique to amplify and strengthen your report, presentation or data storytelling based on the numerical data you found.


As a tool, ChatGPT can be quite helpful in the daily struggles of all types of developers. From generating code and explaining complex topics to code translations. Although ChatGPT – and large language models in general – are here to stay, we should keep emphasizing they are just that: tools. These tools should guide users, help them with problem-solving, not replacing skills. More specifically, it should boost or empower our creativity in the same way that internet, GPS and cell phones have changed our lives.

ChatGPT might not be able to solve all of your problems, but our team of professionals is here to assist you!

Return to the blog