File size: 483 Bytes
c188624
 
 
 
 
 
eae3945
c188624
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pandas as pd
import streamlit as st

@st.cache_data
def cargar_articulos():
    articulos = pd.read_csv('articulos.csv')
    articulos=articulos.iloc[0:100,:] # Cargando solo 100
    # Eliminando la primera columna
    articulos.drop("Unnamed: 0", axis=1, inplace=True)
    # creando columna nueva ID
    articulos['ID']=articulos.index 
    articulos.ID = pd.Series(["D"+str(ind) for ind in articulos.ID])
    # Retornando el dataframe con los articulos 
    return articulos