Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Notebook 3 and Function Library #49

Closed
wants to merge 1 commit into from

Conversation

MichaelFurey17
Copy link
Contributor

@MichaelFurey17 MichaelFurey17 commented Nov 27, 2018

Close #40 and #43

@MichaelFurey17 MichaelFurey17 self-assigned this Nov 27, 2018
def lar_select_by_product(
schema_name="hmda_public",
table_name="lar_{year}",
select="*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have logic that unpacks user defined parameters passed to the "select" argument?

I don't see them and without something it is likely that user inputs will result in an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can make a change. Would you be referring to how users name variables to be called against the database?

return var
#The case for one product code.
else:
#Converts to a string with parentheses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check into using tuples, they're pretty cool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can look into this! I avoided using the tuple function on single values at the moment because the output tended to be ("value", ). If there is a better way to do this I am open to it!

# A table of LAR data can be transformed into numerics by casting
# variables individually in the select statement. Non-categorical
# variables, such as loan amount or income, can be converted to
# numerics while maintaining non-categorical variables, such as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The discussion here should include bit on handling NA values when mixed with numeric data, such as in the income field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! We can discuss.

@Kibrael Kibrael closed this Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Analysis Notebook 3
2 participants