Clickable pandas columns to content within the same webpage

Summary

I would like to have a pandas column with clickable links within the cited pandas column to move the view of the website to another piece of information listed at the bottom of the webpage. The code below provides web-links to external websites. This piece of code is almost achieving the expected goal; however, I would want for the links within the pandas column to point to content within the same webpage and not redirecting to an external website and/or other webpages within the same App. Is there a way to achieve this?

Steps to reproduce

Code snippet:

import pandas as pd
import streamlit as st

data_df = pd.DataFrame(
    {
        "apps": [
            "https://roadmap.streamlit.app",
            "https://extras.streamlit.app",
            "https://issues.streamlit.app",
            "https://30days.streamlit.app",
        ],
    }
)

st.data_editor(
    data_df,
    column_config={
        "apps": st.column_config.LinkColumn("Trending apps")
    },
    hide_index=True,
)

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Moving the view of the website to another section listing information within the same webpage.

Actual behavior:

After clicking the pandas column link, it either opens a new webpage or points to an external website.

Debug info

  • Streamlit version: 1.23
  • Python version: 3.9

Links

* Link to your GitHub repo:

Hi @lcqsigi,

Thanks for posting!

Are you looking for in-page navigation anchors?

Indeed, in-page anchors are expected; however, I am searching for a solution that lists anchor links within the cells of a pandas column and moves the website view to another location within the same web-page. I think you are correct; however, I could not find the best combination of technical terms to describe the problem above. Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.