Share a clear and concise description of the issue. Aim for 2-3 sentences.
Hi everyone, I’m trying to detail my session.sql created- dataframe with columns and rows… Assume that the column names already exist as part of the sql query and we’re just calling them from there. The rows I want to make will be made up.
Appreciate the support…
I would recommend adding a column for row_name, and making that the index of the dataframe, and either filtering down to the columns you want in the query itself, or filtering the dataframe afterwards with pandas.
You can set the row names with liq_df.index = row_names.
For showing only certain columns, just don’t include any other columns in your query. Or if you relly need columns that you don’t want to show: st.dataframe(liq_df[columns_to_show]).
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.