The world’s leading publication for data science, AI, and ML professionals.

Tired of JupyterLab? Try DataSpell – A New Amazing IDE for Data Science

If JupyterLab and PyCharm had a baby…

Photo by Victoriano Izquierdo on Unsplash
Photo by Victoriano Izquierdo on Unsplash

Disclaimer: This is not a sponsored article. I don’t have any affiliation with DataSpell or its creators. The article shows an unbiased overview of the IDE, intending to make Data Science tools accessible to the broader masses.

The data science IDE market isn’t all that saturated. You have Jupyter for maximum interactivity on the one side, and PyCharm as a professional environment on the other. You can also use text editors such as VSCode, but I find those a bit tiresome.

There‘s a new kid on the block – Dataspell – an IDE made exclusively for data scientists. It’s in a preview version, but you can sign up for it here. I’ve waited a couple of weeks until they sent me the link. Hope the wait time will be shorter for you.

Today you’ll see what this IDE has to offer. We’ll go over the basic introduction, creating your first notebook, smart code assistance, database support, markdown, and much more.

Spoiler alert: it’s fantastic.


What is Dataspell?

Dataspell is an IDE (Integrated Development Environment) made exclusively for data scientists. It’s developed by Jetbrains – a company behind IntelliJ Idea and PyCharm, so it doesn’t need further introduction.

The IDE isn’t officially released yet. You’ll have to sign up for the preview version and wait to get a download link. All major OS platforms are supported, ARM (M1) Macs included.

Here’s what the IDE offers (source):

  • Native notebook experience – It will feel at home if you have worked with Jupyter.
  • Smart coding assistance – Kind of if Jupyter and PyCharm have made a baby.
  • Markdown and JavaScript – Style the notebooks however you want and embed data visualizations.
  • Interactive shell – REPL console + syntax checking.
  • SQL database support – Connect to databases, visually inspect data, import/export data, and more.

And the thing is still in active development!

But enough of the fluff talk. Let’s see how the thing looks like:

Image 1 - Dataspell IDE (image by author)
Image 1 – Dataspell IDE (image by author)

It will look and feel familiar if you’ve done anything in PyCharm.

To summarize, the thing is really capable on paper and looks amazing. Let’s see how to start working with notebooks next.


Create your first notebook

The process is almost identical to any other Jetbrains product. Click on the root directory and go to New – Jupyter Notebook:

Image 2 - Creating a Jupyter Notebook
Image 2 – Creating a Jupyter Notebook

I’ve named mine first_notebook.ipynb. You don’t have to write the extension.

Here’s how it looks like:

Image 3 - Jupyter Notebook in Dataspell (image by author)
Image 3 – Jupyter Notebook in Dataspell (image by author)

Style is a personal preference thing, but you can’t say the design isn’t top-notch.

You’ve probably seen the option to create an R script and markdown files when you created the notebook. Dataspell will support both R and Julia as soon as Python works without hiccups (source).

Let’s explore now how basic Python and data science libraries work. The following image shows both Numpy arrays and Pandas DataFrames:

Image 4 - Numpy and Pandas with Dataspell (image by author)
Image 4 – Numpy and Pandas with Dataspell (image by author)

Just as expected. I love how Numpy arrays are printed as Pandas Series, but it’s just a personal preference.

What about Matplotlib? Here’s a real simple scatter plot:

Image 5 - Matplotlib with Dataspell (image by author)
Image 5 – Matplotlib with Dataspell (image by author)

That’s the thing that always bothered me with JupyterLab and dark themes. The visualizations remain white. To be clear, I prefer white backgrounds on visualizations for publications, but can’t stand them when working at night. Good job, Dataspell.

Next, let’s explore a feature every IDE must have – smart coding assistance.


Smart coding assistance

What I don’t like about JupyterLab is the lack of coding assistance. There are plugins, sure, but their aid is nowhere near professional IDEs. What I dislike about IDEs is the lack of interactivity. Hopefully, Dataspell will be the best of both worlds.

Let’s try to import Numpy and see what happens:

Image 6 - Coding assistance with Dataspell (1) (image by author)
Image 6 – Coding assistance with Dataspell (1) (image by author)

That’s the first bit – autocomplete – and it works flawlessly. The next bit is warnings/errors when the code isn’t written correctly.

Here’s an example – the add_integers function should return an integer, but it intentionally returns a float:

Image 7 - Coding assistance with Dataspell (2) (image by author)
Image 7 – Coding assistance with Dataspell (2) (image by author)

Works as advertised!

Next, let’s explore markdown – a way to make your notebooks more readable to humans.


Markdown support

Dataspell didn’t forget about Markdown. To start, hover above a cell and click on Add Markdown Cell:

Image 8 - Markdown with Dataspell (1) (image by author)
Image 8 – Markdown with Dataspell (1) (image by author)

An alternative approach is to click on the Code dropdown and switch the cell type to Markdown.

Here’s some Markdown code for you to try:

Image 9 - Markdown with Dataspell (2) (image by author)
Image 9 – Markdown with Dataspell (2) (image by author)

And here’s how it looks when you run the cell:

Image 10 - Markdown with Dataspell (3) (image by author)
Image 10 – Markdown with Dataspell (3) (image by author)

To summarize – most of the things work as expected. However, I’m having trouble writing math equations, as these don’t work the same way as in JupyterLab. Feel free to leave a comment if you know a solution.

Finally, let’s explore yet another functionality essential to data science – databases.


Database support

As a data scientist, you’ll have to establish and manage database connections pretty much daily. It isn’t easy to debug long SQL lines when SQL is written as a string. Dataspell has a solution.

Here’s how you can establish a connection, create a database and a table with the sqlite3 package:

Image 11 - Database support with Dataspell (1) (image by author)
Image 11 – Database support with Dataspell (1) (image by author)

You can now insert the data as you usually would:

Image 12 - Database support with Dataspell (2) (image by author)
Image 12 – Database support with Dataspell (2) (image by author)

What makes Dataspell special is the option to explore the database without leaving the IDE or writing unnecessary queries. Simply double-click on the database, and a new side window will open.

From there, you can easily click on any table of interest to explore it in a separate tab:

Image 13 - Database support with Dataspell (3) (image by author)
Image 13 – Database support with Dataspell (3) (image by author)

Awesome, isn’t it? This feature comes by default in the professional version of PyCharm, so it likely won’t surprise many of you.

The question remains – should you use Dataspell? What are the downsides of this IDE? Continue reading to find out.


The verdict

Dataspell is a fantastic upcoming IDE for anyone into data science. But is it the right tool for you? It depends.

Data science positions differ from company to company. If you’re doing more coding than data science, then PyCharm might be the better option. On the other hand, if most of what you do is purely data science, look no further than Dataspell.

The only disadvantage I see with Dataspell is the pricing. No, it won’t be a free product. You can expect a similar quote to other Jetbrains products – €89.00 when billed annually and €8.90 when billed monthly.

It’s yet another subscription no one wants. I don’t see why there isn’t a one-time purchase option, as I’d prefer it over a subscription-based model.

What are your thoughts on Dataspell IDE? Will it replace JupyterLab for you, or is the subscription a deal-breaker? Let me know in the comment section below.

Here are some helpful links to learn more about Dataspell:


Loved the article? Become a Medium member to continue learning without limits. I’ll receive a portion of your membership fee if you use the following link, with no extra cost to you:

Join Medium with my referral link – Dario Radečić


Stay connected


Related Articles