Skip to content

Display playlist page #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lyrics to df
  • Loading branch information
jastworld committed Dec 2, 2022
commit 6c1134912391f3aaec23c076574ac7732166f294
12 changes: 5 additions & 7 deletions LyricsFetcher/lyrics_processor.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import pickle
from typing import List
import tabulate
import pandas as pd


def get_data():
def get_data()-> pd.DataFrame:
song_list: List[dict]
with open('LyricsFetcher/songs.pkl', 'rb') as f:
song_list = pickle.load(f)
return song_list
df = pd.DataFrame.from_records(song_list)
return df

def print_dataset(dataset):
header = dataset[0].keys()
rows = [x.values() for x in dataset][:10]
print(tabulate.tabulate(rows, header))


dataset = get_data()
print(dataset[60])
print(dataset.head())
#print_dataset(dataset)