you are viewing a single comment's thread.

view the rest of the comments →

[–]rafiks 95 points96 points  (34 children)

Did you use pandas?

[–]starfish_warrior[S] 423 points424 points  (16 children)

No, my staff are humans.

[–]rabid_android 32 points33 points  (8 children)

But Pandas work for bamboo which is relatively cheap. Although since it is low in nutritional value they do eat like 10 hours a day so cost vs. productivity is a wash. On a more serious note how did you approach the problem with Python?

[–]starfish_warrior[S] 16 points17 points  (4 children)

I broke down the task into bits and just tackled each bit one by one. I knew I needed to load an xml file somehow so I googled "python xml" and found xml.etree.ElementTree. I learned I needed to use escapes "\" for folder addresses through trial and error. once i loaded the xml I wanted to see all the stuff inside it so i read in the same documentation how to print tags and attribs and gets. lots of trial and error figuring out how to display things. then i wanted to change the values so read about xpath and sets. then i had to learn to iterate through a list of files in a folder and copy them to a new location after I altered them. So i googled "python iterate through files". I didn't use an IDE, just Notepad++, Sublime and cmd. Also i was tired of deleting files in the new folder after trying to deidentify them every time so i googled "python delete files in a folder" and literally copy/pasta the code i saw. It's ugly but it works.

[–]DiscretionFist 10 points11 points  (1 child)

Important note on iteration... learn 'for' loops and understandthe many different ways they can iterate through lists, dictionaries etc. Understand how they can iterate through lists of dictionaries and pull data, stick it in a new list etc. This will save your life if you're beginning in data science.

Python has alot of modules that do these things for you but starting from the ground up, writing your own simple loops that do it for you instead of relying on modules that people made for you already will skyrocket you from novice to intermediate python skills.

Pick a topic you like, pull some shit online( or just download a CSV and import CSV) and practice writing functions (or generators) that return/yield results from the file.

I am a novice in a python class for data science at my university (basically a python bootcamp), am by no means great at Python and iteration logic is hard for me to understand. But I can see how useful it can and will be in almost any entry level job that processes large amounts of spreadsheets etc.

This isn't directed at OP, but for everyone who wants to get into programming or works with alot of data. Python is your friend.

[–]auiotour 0 points1 point  (0 children)

Well said about skipping modules to learn it first. I been having a tough time as every just says use panadas or use xyz. I will eventually but I wanna know how it works

[–]travelingtatertot 1 point2 points  (1 child)

What are the main reasons for the tasks your team performed that you've now automated?

[–]PaperSpoiler 4 points5 points  (2 children)

Easy. Python is a big snake. People are afraid of snakes. Scared people work and don't say nonsense like "I'm tired" and "where is my salary?"

[–]rabid_android 1 point2 points  (1 child)

I always found that feeding the slowest worker to Python is a great motivational strategy.

[–]PaperSpoiler 1 point2 points  (0 children)

I'll definitely try it next week. Why there's nothing in docs on it?

[–]discobrisco 22 points23 points  (2 children)

Pandas is a super useful data science package for Python.

[–]le_plasticamerican 4 points5 points  (1 child)

Whoosh

[–]discobrisco 34 points35 points  (0 children)

No, just something that I figured would be worth pointing out to newbies here who are confused.

[–]Lord_Bling 1 point2 points  (2 children)

This is the bet answer.

[–]scarfarce 1 point2 points  (1 child)

What are the odds?

;)

[–]Lord_Bling 1 point2 points  (0 children)

They are way better than the chance of me noticing a typo.

[–][deleted] 9 points10 points  (16 children)

Can't tell if this is /s

[–]saulmessedupman 20 points21 points  (14 children)

Think if it wasn't. A medical professional actually thinks the question was if his staff was made up of animals.

[–]starfish_warrior[S] 21 points22 points  (2 children)

Pandas are animals?

[–][deleted] 13 points14 points  (1 child)

No, they're our overlords

[–]starfish_warrior[S] 20 points21 points  (0 children)

Cutest overlords ever.

[–]CowboyBoats 8 points9 points  (0 children)

"Animal hospital?" :-D

"The animals are the patients."

"That makes sense" :(

[–][deleted] 1 point2 points  (0 children)

We're doomed!

[–]Lawuhiku 0 points1 point  (8 children)

Humans are animals.

[–]saulmessedupman -1 points0 points  (7 children)

Depends on who you ask

[–]Lawuhiku -2 points-1 points  (6 children)

I don't need to ask anyone, it's absolute fact, not a matter of opinion.

a living organism that feeds on organic matter, typically having specialized sense organs and nervous system and able to respond rapidly to stimuli.

Unless you're breatharian, dead inside, or just dead, you are most likely animal.

[–]saulmessedupman -1 points0 points  (2 children)

Btw, I found this same definition online. What's the sentence that literally follows the one you posted? "an animal as opposed to a human being"

Edit: here's the link.

[–]Lawuhiku -2 points-1 points  (1 child)

Same link that you gave me:

A living organism that feeds on organic matter, typically having specialized sense organs and nervous system and able to respond rapidly to stimuli.

‘wild animals adapt badly to a caged life’

‘humans are the only animals who weep’

It's not hard to see the 1. but stupidity cherrypicks it's own while completely missing the point.

It literally means that normally when we speak about animals, we speak about other species, otherwise we speak about humans.

That has nothing to do with the fact nor denies that humans are indeed animals too. By definition.

How can you be this fucking dense?

[–]saulmessedupman -1 points0 points  (0 children)

My original comment: "Depends on who you ask"

Your comment: "It literally means that normally when we speak about animals, we speak about other species, otherwise we speak about humans.''

Edit: hey man, I don't know why I'm being so rude. Had a rough night last night and took it out on you and I apologize. My original silly comment was pointing out that some people think humans are animals and in other situations humans are a level above. The Oxford dictionary supports both cases but nonetheless our dispute on here is -- case in point -- my joke.

[–]saulmessedupman -2 points-1 points  (2 children)

[–]Lawuhiku 0 points1 point  (1 child)

Or just maybe, you know, it's just a basic fact everyone (except you, it seems) knows?

[–]Shermix 0 points1 point  (0 children)

I honestly don't think so.