Find Jobs
Hire Freelancers

Customize step in range python

€8-30 EUR

Đã hoàn thành
Đã đăng vào gần 4 năm trước

€8-30 EUR

Thanh toán khi bàn giao
I'm trying to iterate over a dataframe, and for each row, if column A has 1 add one to the counter, if it has 0 don't count the line in the counter (but don't skip it). When we reach 10 for the counter, take all the rows and put them in an array and restart the counter. After searching a bit, it seems that generators could do the trick but I have a bit of trouble with them. So far I have something like this. data = [login to view URL]([login to view URL](0,50,size=(50, 4)), columns=list('ABCD')) data['C'] = [login to view URL](2, size=50) data counter = 0 chunk = 10 arrays = [] for x in range(0, len(data), chunk): array = [login to view URL][x: x+chunk] [login to view URL](array) print(array) that's what my code looks like for now. I'd like to replace the step(currently chunk) so that it is a variable step because each chunk will be of a different size(currently they are all 10 rows each). I put pandas as an example to simplify but I actually use another library called vaex, very similar to pandas but for larger dataframes (100 Million rows +). It has almost the same caracteristics, but it does not have functions like cumsum or groupby, that's why I want to use a for loop.
Mã dự án: 26201646

Về dự án

1 đề xuất
Dự án từ xa
Hoạt động 4 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
github: [login to view URL] Hi I am a senior ML & AI developer. I have read your requirement very carefully. I have 2+ years of ML & AI development and get a lot of experience. My main skills are: FrontEnd ,Data Scrapping, ML, Deep Learning ,several classifier methods My hard and honest work will satisfy you. For example, I can work for 8~12 hours a day from Monday through Friday and then spend whole weekend for you if needed. I will keep deadline and my good result will improve our relationship. I hope to work with you and pioneer the new phase of your project. Please contact me and discuss with me. Best Regards Sagar Bhalke
€19 EUR trong 7 ngày
5,0 (16 nhận xét)
4,4
4,4

Về khách hàng

Cờ của AUSTRALIA
Sydney, Australia
5,0
5
Phương thức thanh toán đã xác thực
Thành viên từ thg 11 16, 2014

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.