Skip to content

Rob Blatt

Data Scientist | Data Analyst

Category Archives: Code

Speeding Up Creating Multiple Empty Lists in Python

list_len = len(old_list) list = [None] * list_len not list = [None] * len(old_list) Use Case: When I create DataFrames, I’ll create a series of lists to fill. The DataFrame is created by using lists. reviews is a list of HTML blocks. Here’s how I would have normally set up the lists. texts = [None] …

Continue reading “Speeding Up Creating Multiple Empty Lists in Python”

Posted byRob BlattJune 27, 2020Posted inCodeTags: lists, python

Posts navigation

Newer posts 1 2 3 Older posts

Recent Posts

  • DataFrame from Lists using Python and Pandas
  • Maple Syrup boils #1 and #2
  • Yelp Ratings Exploration
  • Speeding Up Creating Multiple Empty Lists in Python
  • Round Numbers and Days Up in Python
Rob Blatt, Proudly powered by WordPress.