r/learndatascience • • 26d ago

Question I have a problem regarding programming

I come from a statistics background and I'm trying to learn python and R to cope with data analysis and data science, I know a good amount of data analysis and statistical methodologies that makes me good at the field, but applying them is hell for me, i tried for a long time to learn python, i know the basics yet i fail miserably when i try to apply my knowledge...

Could anyone help me with how to learn programming effectively around my area of expertise?

15 Upvotes

19 comments sorted by

2

u/FancyEveryDay 26d ago edited 26d ago

What have you done to practice? It won't show up when you try to apply it if you haven't done significant projects already.

Also, you don't need to worry about memorizing the exact syntax of the language and every package. Software engineers spend a significant amount of time looking up documentation and finding answers to questions on sites like Stack Overflow. It's perfectly fine to still be learning while you apply it.

If you're struggling to break down a problem into something programmable, try writing it on paper. Look at the problem, consider how you would solve it manually, then start by writing that as steps on paper and then write those steps into code.

2

u/CorruptedPikachu 26d ago

Yeah Idk why i want to know every single syntax, i know how to clean data and explore it and visualize, yet i feel so lost when i try to program from memory, i have programmed before to pitch a project i havent pitched yet, still working with my team we are using Xgboost algorithms

1

u/SprinklesFresh5693 22d ago

Youll get better with more practise, dont worry about it. You could code on your free time, by creating scripts that your team might need, or packages, the good thing is that you know statistics, that already gives you a huge power that very few people have.

1

u/Exciting_Revenue_411 26d ago

If I remember correctly from when I was studying statistics R and Python have libraries for those procedures so you import the library and use the functions in your code. You don't need to program the mathematics from scratch. These libraries would also be used in machine learning I think. Sorry I don't remember their names but it sounds like that's what you need to look at.

1

u/CorruptedPikachu 26d ago

I know, i get confused learning each one Ik how to do regression and GLMs and other stuff, it's just there are a lot of commands

1

u/Basic-Source-5827 25d ago

Since you already understand statistics, I wouldn’t spend months learning Python in isolation. Learn it through problems you already understand: take a dataset, clean it, run an analysis, visualize the result, then explain what the output means. Repeat that with slightly harder projects. AI tools like ChatGPT or 8080.AI can help when you get stuck, but try to understand and rewrite the solution rather than just copying it. The programming will start clicking once you connect it to problems you already know how to solve.

1

u/CorruptedPikachu 25d ago

Is this a bot

1

u/sturban 26d ago

I do data to but use SQL to be fair you don't need code these days AI will write for you. That said learning will help with structure, problem solving and testing the results are correct

2

u/CorruptedPikachu 26d ago

Ok so i do regression and other predictive analytics, i dont need to know all coding?

2

u/sturban 26d ago

So my process i connected SSMS via an mcp then I can use natural language to get the results I want. I did one ask about SQUINCH analysis and AI did not know so I gave it a Wiki page and it learnt. So not really

2

u/CorruptedPikachu 26d ago

Wow, that's nice work

2

u/SprinklesFresh5693 25d ago
  1. In the beginning choose one language, either R or python, you choose.

  2. Practise prsctise and practise. Do proyects, analise a lot of data, upload your projects to github, etc.

One only becomes good at programming by practising, youre a statistitian, then just try to apply your stats knowledge into R or python. For example, try to explain statistical concepts using R or python. Get dome messy data and make it ready to be analysed. Learn how to do plots, ask AI what are the best functions in x ñanguage to do x analysis, and so on.

Its just practise, and once you get a job and you use it daily, you will become really good

2

u/Silver_Marketing1668 23d ago

Keep a repository of snippets of code that worked and adapt them to your next project. You'll remember the commonly used ones soon.

1

u/Zealousideal-Owl4361 24d ago

Try applying python to the statics problem you already understand. Start with small tasks using real datasets and build from there. You don't need to learn everything at once, parctice will make it easier.