Introducing the Mito Streamlit component

Introducing Mido: A Spreadsheet Interface for Streamlit Apps

As Jake from Mido explains, you may be used to using different types of tables in your streamlined apps, but now you can actually use Mido as a component in your stream build app. Mido is a spreadsheet interface that allows users to interact with data in a familiar way while also generating equivalent Python code.

Mido's Spreadsheet Interface

Here we have a full spreadsheet inside of a streamlined app right here, and in this version, as we interact with the spreadsheet, everything we do is going to generate the equivalent python. Let's take a look at how this works by adding a column to our spreadsheet and renaming it to "month". We can see that everything we're doing down here is generating code. Next, let's put a formula in our spreadsheet using a normal spreadsheet function like "MONTH" that you're used to using in something like Excel. If we pull those out here, we've now got this month pulled out of the date.

Now, let's say we want to take this month and pivot it so we can look at the average trading volume for this stock price per month. To do this, we'll go to our activity table that's my rows, put "month" as our value, put "volume" as our column, and then put "median" here. But let's change this to a integer first or float since it looks like that. Now, let's make that pivot table again and do "month" and put "volume" here. Here we get the average trading volume of all you per month um for this Tesla stock data. And when we come down here, we get the code for all this so everything we're doing is recorded. So it's a great way to give your users access to an interactive spreadsheet inside streamlit but also allow them to generate code as they use that data.

How Mido Works

To see how Mido works, let's go back to the GitHub file. We're importing Streamlit and also importing the Mido sheet Streamlit package and then we want to have the spreadsheet piece as well. Here, we come down and we use the spreadsheet function to call down the data that we want to use and then we're using uh sd.right and sd.code which is what generates the uh recorded code down here if you don't have that then the code won't appear.

Let's Look at Some Other Streamlab Apps

Here's one where we're doing some data cleaning and this one notably doesn't have the generated code so it's giving me steps to do to clean this data set and do some verification on it. So I want to rename this to issue date, need to get rid of that there we go and now it tells us the next thing to do is I want to make this issue date a datetime there we go and now I want to filter out all the null values in this data set so I'm going to come to the filter here and we will filter out two is not empty oops and so now we filter out all the null values. There's a lot more steps we can do in here but you can see we can really do full spreadsheet work in uh in this component here.

Mido with Databases

Finally, let's cover an example where we're actually connected to a database. We're connected to this banking database and that information here is populating the spreadsheet which is then um dictating what is in these charts here. So we have total interest income by Bank we have estimated Insurance deposits by bank there's bunch of things here and if I take these off we'll see that the data. This is running a snow park query as we can see I just take a second see that the data adjusts and the charts do well. I can also come into my snowflake database here and decide what banks I want to use as I connect great.

Conclusion

Mido is a great way to give your users access to an interactive spreadsheet inside streamlit but also allow them to generate code as they use that data. It's really easy to use, it's a fully functional spreadsheet inside of your streamlab it's going to make working with data for your users a lot more intuitive and a lot more uh more interesting for them so I hope you check it out.

"WEBVTTKind: captionsLanguage: enhey this is Jake from Mido I'm going to show you the new Mido streamlit integration so you might be used to using different types of tables in your streamlined apps but now you can actually use Mido as component in your stream build app Mido is a spreadsheet interface so here we have a full spreadsheet inside of a streamlined app right here and in this version as we interact with the spreadsheet everything we do is going to generate the equivalent python so this is inside streamlip if I add a column here and I'm going to rename this column to the month we can see that everything we're doing down here is generating code and let's put a formula we're going to use the actual month function normal spreadsheet functions that you're used to using in something like Excel if I pull those out here we've now got this month pulled out of the date here and now let's say we want to take this month and pivot this so I want to look at the average trading volume for this stock price uh per month so I'm going to go to activity table that's my rows I'll put month as my value I will put the volume and then I would put the median here but it looks like I need to change this to a integer first or float there we go and now let's make that pivot table again and we'll do month and we'll put the volume here and so here we get that's what that mean here we have the average trading of all you per month um for this Tesla stock data and when I come down here we get the code for all this so everything we're doing is record all the code is recorded So it's a great way to give your users access to a interactive spreadsheet inside streamlit but also allow them to generate code as they as they use that data let me go back to the GitHub file here just you can see how this works so we're importing streamlip we're also importing the Mido sheet streamlit package and then we're going to want to have the spreadsheet piece as well we come down here and we use the spreadsheet function to call down the data that we want to use and then we're using uh sd.right and sd.code which is what generates the uh recorded code down here if you don't have that then the code won't appear let's look at some other streamlab apps as well here's one where we're doing some data cleaning and this one notably doesn't have the generated code so it's giving me steps that I want to do to to clean this data set and do some verification on it so I want to rename this to issue date I need to get rid of that there we go and now it tells us the next thing to do is I want to make this issue date a date time there we go and now I want to filter out all the null values in this data set so I'm going to come to the filter here and we will filter out two is not empty oops and so now we filter out all the null values there's a lot more steps I can do in here but you can see we can really do full spreadsheet work in uh in this component here and finally I'll cover this last example we're actually connected to a database here so we're connected to this banking database this is a some snowflake data that we have on some different banks and that information here is populating the spreadsheet which is then um dictating what is in these charts here so we have total interest income by Bank we have estimated Insurance deposits by bank there's a bunch of things here and if I take these off we'll see that the data this is running a snow park query as we can see I just take a second see that the data adjusts and the charts do as well I can also come into my snowflake database here and decide what banks I want to use as I connect great if you want to learn more about how to use Mito inside your cumulative app all you got to do is come to our documentation come down to might overstreamlet and you can see a bunch of things here installing the API reference app gallery lots of different apps but it's really easy to use it's a fully functional spreadsheet inside of your streamlab it's going to make working with data for your users a lot more intuitive and and a lot more uh more interesting for them so I hope you check it outhey this is Jake from Mido I'm going to show you the new Mido streamlit integration so you might be used to using different types of tables in your streamlined apps but now you can actually use Mido as component in your stream build app Mido is a spreadsheet interface so here we have a full spreadsheet inside of a streamlined app right here and in this version as we interact with the spreadsheet everything we do is going to generate the equivalent python so this is inside streamlip if I add a column here and I'm going to rename this column to the month we can see that everything we're doing down here is generating code and let's put a formula we're going to use the actual month function normal spreadsheet functions that you're used to using in something like Excel if I pull those out here we've now got this month pulled out of the date here and now let's say we want to take this month and pivot this so I want to look at the average trading volume for this stock price uh per month so I'm going to go to activity table that's my rows I'll put month as my value I will put the volume and then I would put the median here but it looks like I need to change this to a integer first or float there we go and now let's make that pivot table again and we'll do month and we'll put the volume here and so here we get that's what that mean here we have the average trading of all you per month um for this Tesla stock data and when I come down here we get the code for all this so everything we're doing is record all the code is recorded So it's a great way to give your users access to a interactive spreadsheet inside streamlit but also allow them to generate code as they as they use that data let me go back to the GitHub file here just you can see how this works so we're importing streamlip we're also importing the Mido sheet streamlit package and then we're going to want to have the spreadsheet piece as well we come down here and we use the spreadsheet function to call down the data that we want to use and then we're using uh sd.right and sd.code which is what generates the uh recorded code down here if you don't have that then the code won't appear let's look at some other streamlab apps as well here's one where we're doing some data cleaning and this one notably doesn't have the generated code so it's giving me steps that I want to do to to clean this data set and do some verification on it so I want to rename this to issue date I need to get rid of that there we go and now it tells us the next thing to do is I want to make this issue date a date time there we go and now I want to filter out all the null values in this data set so I'm going to come to the filter here and we will filter out two is not empty oops and so now we filter out all the null values there's a lot more steps I can do in here but you can see we can really do full spreadsheet work in uh in this component here and finally I'll cover this last example we're actually connected to a database here so we're connected to this banking database this is a some snowflake data that we have on some different banks and that information here is populating the spreadsheet which is then um dictating what is in these charts here so we have total interest income by Bank we have estimated Insurance deposits by bank there's a bunch of things here and if I take these off we'll see that the data this is running a snow park query as we can see I just take a second see that the data adjusts and the charts do as well I can also come into my snowflake database here and decide what banks I want to use as I connect great if you want to learn more about how to use Mito inside your cumulative app all you got to do is come to our documentation come down to might overstreamlet and you can see a bunch of things here installing the API reference app gallery lots of different apps but it's really easy to use it's a fully functional spreadsheet inside of your streamlab it's going to make working with data for your users a lot more intuitive and and a lot more uh more interesting for them so I hope you check it out\n"