Skip to content

Instantly share code, notes, and snippets.

View prakashrd's full-sized avatar
🏠
Working from home

Jai Prakash prakashrd

🏠
Working from home
View GitHub Profile
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!
@prakashrd
prakashrd / 00-OozieWorkflowShellAction
Created July 5, 2017 07:34 — forked from airawat/00-OozieWorkflowShellAction
Oozie workflow with a shell action - with CaptureOutput Counts lines in a glob provided and writes the same to standard output. A subsequent email action emails the output of the shell action
This gist includes components of a oozie workflow - scripts/code, sample data
and commands; Oozie actions covered: shell action, email action
Action 1: The shell action executes a shell script that does a line count for files in a
glob provided, and writes the line count to standard output
Action 2: The email action emails the output of action 1
Pictorial overview of job:
--------------------------