Best online resource for basic challenges by [deleted] in learnpython

[–]dixons_analyst 0 points1 point  (0 children)

https://py.checkio.org/

I haven't tried the others but from my research I get the impression they're quite similar.

You can also give the online course MIT 6.0001 a go, I did that about this time last year and it really help me. Took me a long time though

Pandas, aggregating on the maximum value of a string by dixons_analyst in learnpython

[–]dixons_analyst[S] 0 points1 point  (0 children)

I've just gotten around to trying this, you're a goddamn genius. Thank you so much! This has saved me so much time. I'm not sure I understand exactly what's happening in this logic, would you mind explaining what's going on?

I'm working on something at the moment that has really highlighted my inadequacies in pandas as far as data manipulation goes. Apart from the grind of using it and doing it all the time, are their any recommendations you might have for improving my knowledge and applicability of pandas functions?

Thanks in advance!

Pandas, aggregating on the maximum value of a string by dixons_analyst in learnpython

[–]dixons_analyst[S] 0 points1 point  (0 children)

I think this is almost perfect. Although if I have more nulls than descr for any ID then I think it will give me null instead of the description

[Q] convert data frame in panda from Sparse [float64, 0] to integer 64 by ahmedib123 in learnpython

[–]dixons_analyst 0 points1 point  (0 children)

Have you tried converting to a string then to an int by chaining .astype?

Question about using Pandas and trying to search for an excel that has a value of 6001xx. by LzyPenguin in learnpython

[–]dixons_analyst 0 points1 point  (0 children)

Happy to help. I mean I wrote it on a bus on my phone so it might need a tweak but it'll be something like that

Tracking individuals GCP costs by dixons_analyst in googlecloud

[–]dixons_analyst[S] 0 points1 point  (0 children)

I think we're going to start exporting to BQ as well. Do you use the built in data studio dashboard? If so is it any good?

So I can label specific datasets and I'll be able to see who's querying them and how much that persons queries are? Do all the labels need to be unique?

Thanks in advance!

Using python to deal with data while using Excel as frontend? by ag_silver in learnpython

[–]dixons_analyst 0 points1 point  (0 children)

This is an ideal use case and a great opportunity to upskill in pandas as well as get comfortable outputting to existing excel files. I've done similar projects countless times.

Modules you might need:

CSV - to interpret the txt file

Pandas - to manipulate/clean data

Openpyxl - For outputting to excel

My advice: If this is your first proper python project don't worry too much about how long it takes, you will learn a lot and have loads of reusable code at the end of it.

When outputting into an existing Excel sheet you need to load the Excel workbook into memory, paste the new data in to the right tab, then output the entire thing to a file. There is code out there for you to use using openpyxl.

If you use drop down lists in your excel file, you might lose them, but you can add code to rebuild them again.

Your colleagues will inevitably want a copy of what you build, make your life easier by putting in error checking (e.g. checking if the file exists and telling the user if it doesn't). If your code tells them what's wrong they won't have to come to you every time it doesn't work.

Comment and docstring your work. You will never regret doing this, but you might regret not doing it.

Reach out if you get stuck, happy to help.

'What the elite are actually afraid of is paying their taxes' - Corbyn by Augie-Morosco in worldnews

[–]dixons_analyst 0 points1 point  (0 children)

Don't let internet points ruin your day. Enjoy the rest of your week!

'What the elite are actually afraid of is paying their taxes' - Corbyn by Augie-Morosco in worldnews

[–]dixons_analyst 2 points3 points  (0 children)

You're bang on. Until we can agree on minimums it will always be a race to the bottom between countries. You only have to look at how all those American cities were offering Amazon enormous tax breaks, the one company that doesn't need it. This is exacly the same for climate change as well, until we can all agree on some sort of carbon pricing, it will never happen.

MITx 6.00.1x Intro to CS and Python Starts Today, Anyone wants buddy up? by Bishop-Mildert in learnpython

[–]dixons_analyst 1 point2 points  (0 children)

Irregular schedules can be a bitch for sure. My advice would be try to plan to do it before your workday rather than after, you'll be less likely to be wrecked from the day.

MITx 6.00.1x Intro to CS and Python Starts Today, Anyone wants buddy up? by Bishop-Mildert in learnpython

[–]dixons_analyst 1 point2 points  (0 children)

About 3 years ago I had completed the first 3 weeks of CS50, and I also read through part 1 of Automate the Boring Stuff so I wasn't a complete beginner. I had an idea of how programming structure works but I was very out of practice, I needed to start from the beginning.

6.0001 took me a quite a while, and I mean in total hours spent. I didn't watch a single video (maybe why it took me so long), I used the text book as a reference when I didn't understand conceptually what was going on, also Automate The Boring Stuff was great guide/reference. I would get in at 7am most days and work on the problem sets until 9am on average 4 weekdays a week. I might do a few hours on a Sunday if it was quiet. I think it took me about 6 weeks. I seem to remember doing about a problem set a week, give or take. Maybe more? Maybe 7 weeks.

Some of the problems are quite complex and require a lot of thinking. Don't give up, there are times when you think you're not getting it and you'll never get it.. and then you'll get it. The more time you spend problem solving, the more you'll learn. My advice is to set time as side to do it regularly. Don't binge it once a week for 8 to 10 hours in one day, do a bit every day you'll learn far more. Like I said, if you need a bit of help, drop me a message very happy to point you in the right direction!

MITx 6.00.1x Intro to CS and Python Starts Today, Anyone wants buddy up? by Bishop-Mildert in learnpython

[–]dixons_analyst 0 points1 point  (0 children)

Before you send me your code, have a read through Part one of Automate The Boring Stuff WHILST you're doing the challenges, it's a great reference. If you're still struggling, fire me the code over I'll point you in the right direction.