Exercicio_S11_Jessica - #6
Open
JessBernardo wants to merge 1 commit into
Open
JessBernardo wants to merge 1 commit into
JessBernardo wants to merge 1 commit into
Conversation
|
|
||
| #Corrija a coluna 'Release Date' para o formato datetime. | ||
|
|
||
| df['Release Date'] = pd.to_datetime(df['Release Date'], errors='coerce') |
Collaborator
There was a problem hiding this comment.
o que faz definir o parâmetro errors='coerce' faz?
|
|
||
| #Crie uma nova coluna chamada 'Streaming Popularity', que seja a média da popularidade nas plataformas 'Spotify Popularity', 'YouTube Views', 'TikTok Likes', e 'Shazam Counts'. (lembrem-se que só é possível calcular médias e fazer operações matemáticas com tipos númericos) | ||
|
|
||
| df['Streaming Popularity'] = (df['Spotify Popularity'] + df['YouTube Views'] + df['TikTok Likes'] + df['Shazam Counts']) / 4 |
Collaborator
There was a problem hiding this comment.
É possível calcular a média as colunas pela função sum()
|
|
||
| #Crie uma coluna 'Total Streams', somando os valores de 'Spotify Streams', 'YouTube Views', 'TikTok Views', 'Pandora Streams', e 'Soundcloud Streams'. | ||
|
|
||
| df['Total Streams'] = (df['Spotify Streams'] + df['YouTube Views'] + df['TikTok Views'] + df['Pandora Streams'] + df['Soundcloud Streams']) |
Collaborator
There was a problem hiding this comment.
é possível obter a soma de varias colunas com o uso do sum()
|
|
||
| #Salve o DataFrame resultante em um novo arquivo JSON chamado 'faixas_filtradas.json'. | ||
|
|
||
| df.to_json('./faixas_filtradas.json', orient='records', lines=True) |
Collaborator
There was a problem hiding this comment.
O que fazem esses parâmetros que você enviou e porque usou?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.