Skip to content
A collection of well-commented code snippets for data science
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
.ipynb_checkpoints
data
example_exploring_border_crossing_data_files
html
incomplete_snippets
misc
old_snippets
Applying_Conditional_Functions_To_List_Items.ipynb
Applying_Functions_To_List_Items.ipynb
README.md
apply_operations_over_items_in_lists.ipynb
arithmetic_basics.ipynb
assignment_operators.ipynb
beautiful_soup_drill_down.ipynb
beautiful_soup_html_basics.ipynb
beautiful_soup_scrape_table.ipynb
beautiful_soup_scraping_into_pandas.ipynb
breaking_up_string_variables.ipynb
brute_force_d20_simulator.ipynb
built_in_object_types.ipynb
cartesian_product.ipynb
cleaning_text.ipynb
code_py.sublime-workspace
continue_and_break_loops.ipynb
convert_categorical_to_numeric_naively.ipynb
create_list_from_dictionary_keys_and_values.ipynb
creating_numpy_arrays.ipynb
csv_to_python_code.ipynb
data_structure_basics.ipynb
dataset_prussian_horse_kicks.ipynb
dataset_war_of_five_kings.ipynb
date_and_time_basics.ipynb
dictionary_basics.ipynb
escape_sequences.ipynb
example_data_wrangling_baby_names.ipynb
example_exploring_border_crossing_data.ipynb
filter_items_in_list_with_filter.ipynb
flatten_list_of_lists.ipynb
for_loops.ipynb
format_method_for_strings.ipynb
function_basics.ipynb
generating_random_numbers_with_numpy.ipynb
ggplot_area_plot.ipynb
ggplot_draw_line.ipynb
ggplot_histogram.ipynb
ggplot_line_plot.ipynb
ggplot_save_as_vector.ipynb
ggplot_scatterplot.ipynb
if_and_if_else_statements.ipynb
if_statement.ipynb
indexing_and_slicing_numpy_arrays.ipynb
ipython_display_image.ipynb
ipython_display_video.ipynb
ipython_notebook.command
ipython_run_script.ipynb
iterate_ifelse_over_list.ipynb
json_parse_file.ipynb
kolmogorov_smirnov_test.ipynb
lambda_functions.ipynb
list_comprehension.ipynb
list_comprehension_2.ipynb
list_operations.ipynb
logical_operations.ipynb
math_operations.ipynb
matplotlib_back_to_back_bar_plot.ipynb
matplotlib_bar_plot.ipynb
matplotlib_grouped_bar_plot.ipynb
matplotlib_histogram.ipynb
matplotlib_map_your_google_data-Copy0.ipynb
matplotlib_map_your_google_data.ipynb
matplotlib_percentage_stacked_bar_plot.ipynb
matplotlib_pie_chart.ipynb
matplotlib_plot_points_on_map.ipynb
matplotlib_save_a_plot_as_vector.ipynb
matplotlib_scatterplot_from_pandas.ipynb
matplotlib_simple_example.ipynb
matplotlib_simple_scatterplot.ipynb
matplotlib_stacked_bar_plot.ipynb
module_basics.ipynb
nesting_lists.ipynb
numpy_array_basic_operations.ipynb
numpy_array_basics.ipynb
numpy_indexing_and_slicing.ipynb
pandas_apply_operations_to_dataframes.ipynb
pandas_apply_operations_to_groups.ipynb
pandas_binning_data.ipynb
pandas_categorical_data.ipynb
pandas_convert_categorical_to_dummies.ipynb
pandas_convert_numeric_categorical_to_numeric_with_patsy.ipynb
pandas_convert_string_categorical_to_numeric_with_patsy.ipynb
pandas_convert_to_datetime.ipynb
pandas_create_column_using_conditional.ipynb
pandas_create_column_with_loop.ipynb
pandas_crosstabs.ipynb
pandas_data_structures.ipynb
pandas_data_wrangling.ipynb
pandas_dataframe_count_values.ipynb
pandas_dataframe_descriptive_stats.ipynb
pandas_dataframe_importing_csv.ipynb
pandas_dataframe_load_xls.ipynb
pandas_dataframe_ranking_rows.ipynb
pandas_dataframe_reindexing.ipynb
pandas_delete_duplicates.ipynb
pandas_drop_column_containing_certain_string.ipynb
pandas_dropping_column_and_rows.ipynb
pandas_example_dataframes.ipynb
pandas_expand_cells_containing_lists.ipynb
pandas_find_largest_value_in_column.ipynb
pandas_find_unique_values.ipynb
pandas_group_rows_by.ipynb
pandas_hierarchical_data.ipynb
pandas_import_html_table.ipynb
pandas_index_select_and_filter.ipynb
pandas_indexing_selecting.ipynb
pandas_iterate_over_rows_of_multiple_columns.ipynb
pandas_join_merge_dataframe.ipynb
pandas_list_comprehension.ipynb
pandas_list_unique_values_in_column.ipynb
pandas_long_to_wide.ipynb
pandas_lowercase_column_names.ipynb
pandas_make_new_columns_using_functions.ipynb
pandas_map_values_to_values.ipynb
pandas_missing_data.ipynb
pandas_moving_average.ipynb
pandas_outliers.ipynb
pandas_pivot_tables.ipynb
pandas_regex_to_create_columns.ipynb
pandas_rename_multiple_columns.ipynb
pandas_replace_values.ipynb
pandas_resample_by_time.ipynb
pandas_sample_dataframe.ipynb
pandas_sampling_dataframe.ipynb
pandas_saving_dataframe_as_csv.ipynb
pandas_search_column_for_value.ipynb
pandas_select_rows_containing_values.ipynb
pandas_select_rows_multiple_filters.ipynb
pandas_select_rows_when_column_has_certain_values.ipynb
pandas_selecting_rows_on_conditions.ipynb
pandas_sorting_rows_dataframe.ipynb
pandas_split_lat_and_long_into_variables.ipynb
pandas_string_munging.ipynb
pandas_time_series_basics.ipynb
pandas_transpose_dataframe.ipynb
pandas_with_seaborn.ipynb
polynomial_fitting.ipynb
recursive_functions.ipynb
regex_by_example.ipynb
regular_expressions_basics.ipynb
schedule_run_in_the_future.ipynb
scipy_fitting_trendline.ipynb
scipy_simple_clustering.ipynb
seaborn_color_palettes.ipynb
seaborn_pandas_timeseries_plot.ipynb
seaborn_pretty_timeseries_plots.ipynb
seaborn_scatterplot.ipynb
set_the_color_of_a_matplotlib.ipynb
snippet_template_1.ipynb
stack_notes.md
standard_object_types.ipynb
string_formatting.ipynb
string_indexing.ipynb
string_operations.ipynb
strings_to_datetime.ipynb
swapping_variable_values.ipynb
testing_the_stack.ipynb
while_statements.ipynb

README.md

code_py

Some well commented data science related code snippets in (mostly) Python 3. It was created by Chris Albon.

This collection of snippits is not comprehensive, and is in many places repetitive.

You can view all the snippits in iPython Notebook Viewer.

You can’t perform that action at this time.