Skip to content

Conversation

@alineyoda
Copy link

No description provided.

faixas_filtradas = df[(df['Spotify Popularity'] > 80) & (df['Total Streams'] > 1_000_000)]

# Salvar base em um arquivo JSON
faixas_filtradas.to_json('faixas_filtradas.json', orient='records', lines=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o que orient="records" faz, e lines=True


# Para verificar se o arquivo foi salvo:
# Carregar novamente para garantir que os dados foram escritos corretamente
df_verificacao = pd.read_json('faixas_filtradas.json', orient='records', lines=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e quando se lê um arquivo json, o que ele faz os parâmetros que enviou?

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