Skip to content

Instantly share code, notes, and snippets.

View ZellW's full-sized avatar
💭
Constantly reviewing new packages while studying new neural network frameworks.

Cliff Weaver ZellW

💭
Constantly reviewing new packages while studying new neural network frameworks.
View GitHub Profile
----
Selecting specific data types
----
# Create subset of only the numeric columns
so_numeric_df = so_survey_df.select_dtypes(include=['int', 'float'])
# Print the column names contained in so_survey_df_num
print(so_numeric_df.columns)
---
One-hot encoding and dummy variables
@ZellW
ZellW / xlsxToR.r
Created November 4, 2017 11:19 — forked from schaunwheeler/xlsxToR.r
Import an xlsx file into R by parsing the file's XML structure.
# The MIT License (MIT)
#
# Copyright (c) 2012 Schaun Jacob Wheeler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@ZellW
ZellW / calendarHeat.R
Created January 4, 2016 13:45 — forked from aaronwolen/calendarHeat.R
Calendar Heatmap by Paul Bleicher
##############################################################################
# Calendar Heatmap #
# by #
# Paul Bleicher #
# an R version of a graphic from: #
# http://stat-computing.org/dataexpo/2009/posters/wicklin-allison.pdf #
# requires lattice, chron, grid packages #
##############################################################################
## calendarHeat: An R function to display time-series data as a calendar heatmap