Skip to content

[Pere] map filter reduce lab#12

Open
perikoloso wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
perikoloso:main
Open

[Pere] map filter reduce lab#12
perikoloso wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
perikoloso:main

Conversation

@perikoloso
Copy link
Copy Markdown

No description provided.

@bripollc
Copy link
Copy Markdown

Pere,

No tengo mucho a comentar ya que todas las respuestas son correctísimas. Te dejo un par de detalles:

  • The next step is to create a function that will remove references. We will do this by splitting the string on the { character.
def reference(x):
    x = x.split("{")
    return x[0]

Te dejo un opción muuuuuucho más sencilla:) Aunque tu respuesta es válida.

  • Let's write a function to split those words. Our function will return the string split on the character \n. Write your function in the cell below.
def line_break(x):
    x_split = x.split("\n")
    x_split = [line for line in x_split if line.strip() != '']
    return x_split

De esta manera eliminarás los espacios en blanco:) (aunque no te lo pide)

Por el Challenge 4 no te preocupes, son cosas que veremos estos días. Pero bien bien bien, me gusta que hayas intentado ya cositas con pandas.

Ps: gracias por no imprimir todo el texto en las respuestas, me facilita mucho la legibilidad del documento! Pero también puedes ir limitando tus impresiones, así veo lo que va pasando en tu código 🙃

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants