Skip to content

Instantly share code, notes, and snippets.

View cecilialee's full-sized avatar

Cecilia Lee cecilialee

View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active July 31, 2024 00:44
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@conormm
conormm / r-to-python-data-wrangling-basics.md
Last active July 23, 2024 17:45
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs:

@pierdom
pierdom / conditional_update_pandas.py
Last active October 28, 2019 21:50
[Conditionally update Pandas DataFrame column] It is equivalent to SQL: UPDATE table SET column_to_update = 'value' WHERE condition #python #pandas #datascience
# set 'column_to_update' to 0 when 'condition_column' is 0
df.loc[df['condition_column'] == 0, 'column_to_update'] = 0
# or with a if-then-else scheme
df["mycol"] = np.where((df.mycol2=="test"), 0, 1)
# condition then else
@NiharG15
NiharG15 / README.md
Last active February 27, 2024 14:39
Iris Classification using a Neural Network

A Simple Neural Network in Keras + TensorFlow to classify the Iris Dataset

Following python packages are required to run this file:

    pip install tensorflow
    pip install scikit-learn
    pip install keras