This file contains 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
//This snippet is a very short jQuery function that is executed when the javascript is exectued on load. | |
// Troubleshooting: | |
// You might want to add a specific class to the accordion element itself and then append that to the first div: ('div#accordionID > ... | |
jQuery(function(){ | |
jQuery('div > div.x-accordion-heading > a.x-accordion-toggle').click(); | |
}); |
This file contains 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
# Rapidly initalize 2D list | |
2dlist = [[0] * 3 for i in xrange(3)] | |
print(2dlist) | |
# [[0, 0, 0], [0, 0, 0], [0, 0, 0]] |
This file contains 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
#Count occurences of string in dataframe | |
#Check how many rows in DataFrame contain certain substring s in column col | |
print(len(df[df['col'].str.contains("s")].index.values[:])) | |
#Index of columns in dataframe containing string | |
#Get indices of rows that contain substring s in column col | |
print(df[df['col'].str.contains("s")].index.values[:]) |
NewerOlder