TEACHIFY Telegram 4180
✔️ کتابخانه Polars — نسل بعدی پردازش داده در پایتون!

اگر با Pandas کار کردی، حتماً می‌دونی گاهی موقع کار با دیتاست‌های بزرگ، سرعتش کم می‌شه و RAM رو می‌بلعه،
اینجاست که Polars وارد می‌شه!

میشه گفت که Polars یه کتابخانه‌ی فوق‌سریع برای تحلیل داده‌ست، نوشته‌شده با زبان Rust و طراحی‌شده برای کار با داده‌های حجیم، چند‌هسته‌ای و سنگین.

چرا Polars بهتر از Pandas عمل می‌کنه؟

■ چندریسمانی (Multi-threaded): از تمام هسته‌های CPU استفاده می‌کنه

■ مبتنی بر Apache Arrow (حافظه‌ی ستونی فوق‌بهینه)

■ مصرف RAM بسیار کمتر

■ تا ۱۰ تا ۱۰۰ برابر سریع‌تر از Pandas در بعضی عملیات‌ها

■ پشتیبانی از حالت Lazy Execution (محاسبه فقط وقتی واقعاً نیاز باشه)

مثال ساده:
import polars as pl

df = pl.read_csv("data.csv")

result = (
    df.filter(pl.col("age") > 30)
      .select(pl.col("salary").mean())
)
print(result)

کد بالا دقیقاً کاری شبیه Pandas انجام می‌ده، ولی خیلی سریع‌تر و بهینه‌تر اجرا می‌شه!

#Python #Polars #Pandas #DataScience #Rust #FastData

@Teachify | برنامه نویسی
👍51



tgoop.com/teachify/4180
Create:
Last Update:

✔️ کتابخانه Polars — نسل بعدی پردازش داده در پایتون!

اگر با Pandas کار کردی، حتماً می‌دونی گاهی موقع کار با دیتاست‌های بزرگ، سرعتش کم می‌شه و RAM رو می‌بلعه،
اینجاست که Polars وارد می‌شه!

میشه گفت که Polars یه کتابخانه‌ی فوق‌سریع برای تحلیل داده‌ست، نوشته‌شده با زبان Rust و طراحی‌شده برای کار با داده‌های حجیم، چند‌هسته‌ای و سنگین.

چرا Polars بهتر از Pandas عمل می‌کنه؟

■ چندریسمانی (Multi-threaded): از تمام هسته‌های CPU استفاده می‌کنه

■ مبتنی بر Apache Arrow (حافظه‌ی ستونی فوق‌بهینه)

■ مصرف RAM بسیار کمتر

■ تا ۱۰ تا ۱۰۰ برابر سریع‌تر از Pandas در بعضی عملیات‌ها

■ پشتیبانی از حالت Lazy Execution (محاسبه فقط وقتی واقعاً نیاز باشه)

مثال ساده:

import polars as pl

df = pl.read_csv("data.csv")

result = (
    df.filter(pl.col("age") > 30)
      .select(pl.col("salary").mean())
)
print(result)

کد بالا دقیقاً کاری شبیه Pandas انجام می‌ده، ولی خیلی سریع‌تر و بهینه‌تر اجرا می‌شه!

#Python #Polars #Pandas #DataScience #Rust #FastData

@Teachify | برنامه نویسی

BY برنامه نویسی | Teachify




Share with your friend now:
tgoop.com/teachify/4180

View MORE
Open in Telegram


Telegram News

Date: |

The group also hosted discussions on committing arson, Judge Hui said, including setting roadblocks on fire, hurling petrol bombs at police stations and teaching people to make such weapons. The conversation linked to arson went on for two to three months, Hui said. A few years ago, you had to use a special bot to run a poll on Telegram. Now you can easily do that yourself in two clicks. Hit the Menu icon and select “Create Poll.” Write your question and add up to 10 options. Running polls is a powerful strategy for getting feedback from your audience. If you’re considering the possibility of modifying your channel in any way, be sure to ask your subscribers’ opinions first. A new window will come up. Enter your channel name and bio. (See the character limits above.) Click “Create.” While some crypto traders move toward screaming as a coping mechanism, many mental health experts have argued that “scream therapy” is pseudoscience. Scientific research or no, it obviously feels good. Add the logo from your device. Adjust the visible area of your image. Congratulations! Now your Telegram channel has a face Click “Save”.!
from us


Telegram برنامه نویسی | Teachify
FROM American