Created
July 19, 2017 15:44
-
-
Save timehaven/6bde45382a722b8741b560d8de7b6d36 to your computer and use it in GitHub Desktop.
Revisions
-
timehaven created this gist
Jul 19, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ df['path'] = df.object_id.apply(file_path_from_db_id) df object_id bi multi path index 0 461756 dog white /path/to/imgs/756/61/blah_461756.png 1 1161756 cat black /path/to/imgs/756/61/blah_1161756.png 2 3303651 dog white /path/to/imgs/651/03/blah_3303651.png 3 3367756 dog grey /path/to/imgs/756/67/blah_3367756.png 4 3767756 dog grey /path/to/imgs/756/67/blah_3767756.png 5 5467756 cat black /path/to/imgs/756/67/blah_5467756.png 6 5561756 dog white /path/to/imgs/756/61/blah_5561756.png 7 31255756 cat grey /path/to/imgs/756/55/blah_31255756.png 8 35903651 cat black /path/to/imgs/651/03/blah_35903651.png 9 44603651 dog black /path/to/imgs/651/03/blah_44603651.png 10 49557622 cat black /path/to/imgs/622/57/blah_49557622.png 11 58164756 dog grey /path/to/imgs/756/64/blah_58164756.png 12 95403651 cat white /path/to/imgs/651/03/blah_95403651.png 13 95555756 dog grey /path/to/imgs/756/55/blah_95555756.png