by boxplot Dec 10, 2018 5:38 pm
This post is updated as appropriate, so keep checking back!
Table of Contents
Check out this article for help: https://github.com/Homebrew/homebrew-core/issues/19286
Check out this article for help: https://stackoverflow.com/questions/13354207/how-to-symlink-python-in-homebrew
This means one of a few things:
- That you are trying to combine data types that aren’t compatible. You can’t concatenate a string and an integer for example.
- You’re trying to perform some operation on the wrong datatype for that function.
Did you forget to put something in quotes? Remember if you didn’t define something as a variable, list, dictionary, etc. previously, and it’s not a number, it needs to be in quotes!
There are several types of indentation errors. These are pretty self-explanatory. You either forgot an indent or have too many. Remember, python considers indents to be four spaces or a tab, exactly.
This could mean a lot of things, but basically you aren’t following one of the basic syntax rules of Python. Here are some common examples:
- Forgetting the parens around the arguments to print
- Forgetting the colon at the end of the condition in an if statement, or in a for loop
- Trying to use a reserved word as a variable name
- Code like:
if my_variable = 8:(should be == 8 when in an IF statement!)
Typically this means you are trying to access an item in a list that doesn’t exist. For example, :
flowers = ["rose", "tulip", "daisy"]
print("Flowers in my garden are:", flowers, flowers, flowers)
There is no
flowers! Remember, lists start at 0, so it should have been
flowers, flowers, flowers.
These seem scary, but they are similar to the NameError, only specific to dictionaries. They are raised when a key is not found in the set of existing keys. Check for spelling and case sensitivity!
This is most commonly caused by trying to convert a bad string into a number. For example:
my_num = int("Word").
Need help applying these concepts to your data? Ask your department or organization to subscribe to our DataChat program.
Continue to make data-driven decisions.
Sign up for our email guides that contains relevant tips, software tricks, and news from the data world.
*We never spam you or sell your information.
"Formatting Charts in Excel"