[Question] pandas data frame in android apps #2324
-
| QuestionCan any one help me I want to make an app that stores data in a CVS using pandas data-frame in android and also whenever i build the app it always gives the initial program on Linux i.e it runs the hello, flet ! command : flet built linux Thanks in Advance Code sampleimport flet as ft
import pandas as pd
def main(page: ft.Page):
    try:
        df = pd.read_csv(
            "assets/machine-readable-business-employment-data-sep-2023-quarter.csv"
        )
        df = df[["Series_reference", "Period", "Data_value"]]
        columnHeader = list(df.columns.values)
        df = df.head(20)
        print(df)
    except FileNotFoundError as e:
        print(e)
        columnHeader = ["NotFound"]
    page.scroll = True
    page.add(
        ft.Row(
            [
                ft.DataTable(
                    columns=[ft.DataColumn(ft.Text(header)) for header in columnHeader],
                    rows=[
                        ft.DataRow(
                            cells=[
                                ft.DataCell(ft.Text(f"{df['Series_reference'][ind]}")),
                                ft.DataCell(ft.Text(f"{df['Period'][ind]}")),
                                ft.DataCell(ft.Text(f"{df['Data_value'][ind]}")),
                            ]
                        )
                        for ind in df.index
                    ],
                )
            ],
            scroll=True,
        )
    )
ft.app(main)Error messageNo response ------------------------------------------------------
 | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            FeodorFitsner
          
      
      
        Jan 8, 2024 
      
    
    Replies: 1 comment 4 replies
-
| You have posted a code, did you attempt to build an apk on it using the command "flet build apk"? | 
Beta Was this translation helpful? Give feedback.
                  
                    4 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
pandasis the "native" package and the entire process is not yet automated for Android and iOS. You need to follow this guide to addpandasto your Android app: https://flet.dev/docs/guides/python/packaging-app-for-distribution#native-python-packages-for-android-and-ios