Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- data = pd.read_csv("fer2013.csv")
- test = data.loc[data["emotion"].isin(['0', '1', '2'])]
- dx = test.to_numpy()
- test.to_csv('emotes3.csv', sep='\t')
- print(test)
- with open("emotes3.csv") as f:
- content = f.readlines()
- lines = np.array(content)
- num_of_instanes = lines.size
- print("number of instances: ", num_of_instances)
- print("instance length: ", len(lines[1].split(",")[1].split(" ")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement