Created
October 7, 2019 09:48
-
-
Save VictorSaenger/1af737da79ca5c0711fc1a0059792d4e to your computer and use it in GitHub Desktop.
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
| #Density: | |
| p = 0.4 | |
| df = pd.read_csv('articles2.csv',header=None,skiprows=lambda i: 1>0 and random.random() > p) | |
| #First batch: | |
| n_s_a = df[df[3] == 'Atlantic'] | |
| n_s_p = df[df[3] == 'New York Post'] | |
| #Second batch: | |
| df = pd.read_csv('articles1.csv',header=None,skiprows=lambda i: 1>0 and random.random() > p) | |
| n_s_b = df[df[3] == 'Breitbart'] | |
| n_s_n = df[df[3] == 'New York Times'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment