Some important #Python concepts that you need to understand, especially if you are an #SEO Specialist and have no clue about this sort of stuff.
You have to do some research, this is just an introduction.
A thread containing the essential that you need for Python 🧵
Lists. Used to contain multiple elements in a single variable, including different types, i.e. numbers with letters etc.
You will often work with lists as they are everywhere.
E.g.
example_list = ["dog", "cat"]
Sets. You probably studied them at school, I am quite sure.
It's a collection of items without duplicates. Therefore, if you want to remove duplicates from a list you can convert to a set first and then retransform into a list.
Dictionaries. The most important data type in Python imho.
A collection of key-value pairs where there are no duplicates.
E.g.
example = {
"Name": "Marco",
"Country": "Switzerland"
}
Tuples. An ordered collection that is also unchangeable, so you cannot add more items I it's created.
E.g.
ex_tuple = ("love", "hate", "anger")
If/else. Logical conditions, what you already studied in Math at school.
Super simple concept.
Functions. Do something, basically. You define a function to carry out some action and define its arguments.
Let's say I want to clean a dataset and I do that often with the same steps, I can just create a function for that and use it over again.
The zip() function. Use it to combine lists together or other data types or even to traverse dictionaries in parallel.
Go check this function as it is quite hard for beginners to get the idea behind zip().
Loops. The core of programming, how to repeat a given action without writing it manually.
How can I print a text 100 times without typing it that many times? You use a loop!
There are 3 types of loop, the first you will learn in Python will probably be the "for loop".
List comprehensions. What if I want to create a new list or change an existing one without writing a for loop on separate lines?
A list comprehension can do that on one line.
E.g. convert each element of list into upper case
ex_list_compr = [x.upper() for x in some_list]
Iterables. Objects that can be iterated over, i.e. you can use loops over them.
The 4 data types we have seen before and strings are an example.
Iterators. Use them for handling large streams of data. They are object with an iteration state and that can be used to iterate over an iterable object.
You can use next() on an iterator to see the next element.
Generators. A subclass of Iterators and an efficient way of Python coding.
They are not so frequent in most SEO notebooks you will see but check them out.
Unpacking. Assign an iterable of values to a tuple or list in a single assign statement.
This should be one of the things you study when you are already confident with the basics. It's not an advanced topic, it just requires the some understanding of other concepts.
Lambda function. Let's say you have to do some data cleaning and you have to use one function on the fly.
Lambdas are for that, you can create one on the moment and that's it. Super versatile and common for data analysis.
Classes and Object-oriented Programming (OOP). Unfortunately, I am not so confident in this topic but you don't need to study it for SEO purposes.
You are mostly interested in data analysis or different use cases.
These are some of the most common concepts you need to understand as an SEO Specialist if you want to use Python.
I have already talked about libraries quite some times, so there is no need to mention them over again.
My favorite concepts are list comprehensions and lambda functions as I use them quite often.
You will see that you can combine a lot of the stuff here to create working code.
You don't need to create super efficient code if you are starting out.
Recall that we are interested in using Python to get insights or automate our work, not to switch career (I guess).
A programming language is more than a set of rules. However, if you learn and understand the basic logic behind most implementations you should be fine.
It takes time and practice to become proficient with something, enjoy the ride.
You can just check some SEO notebooks around the web to see if you are able to understand the code and the logic.
If you want to be truly efficient, you have to go somewhere else. It's not part of the role of an SEO Specialist to produce ultra efficient code.
To each their own, but if you can do that it's great!
Having a mentor can help you but you need to hone your data understanding skills by yourself.
You have to do the heavy lifting and improve your knowledge of SEO data you will be working with.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Some considerations about Keyword Research, SERP analysis, entities and whatever you can think of.
This #SEO thread is about my personal advices and considerations for research 🧵
Spending hours on Keyword Research is boring, start from a topical map instead. Then, look for those keyword clusters you were missing and update it.
[Ecommerce] If the Search Volume is low, add a facet/filter or even a heading in a page. You don't need to create a subcategory for everything, it's a waste of time, especially when the competition is super low.