27 Matching Annotations
1. Jul 2023
2. app.datawars.io app.datawars.io
1. The parameter by specifies the columns, and ascending takes a list to define the sorting direction per each column. In this case, we're sorting by Country name in descending order first (in lexicographical order), and by number of Employees in ascending order second.

Pandas DataFrame allows for multiple sorting

#### URL

3. www.geeksforgeeks.org www.geeksforgeeks.org

با پانداس میاد میخونه

معرفی کرد Feature و Label خودشا

#### URL

4. app.datawars.io app.datawars.io
1. Bollinger bands are just a simple visualization/analysis technique that creates two bands, one "roof" and one "floor" of some "support" for a given time series. The reasoning is that, if the time series is "below" the "floor", it's a historic low, and if it's "above" the "roof", it's a historic high. In terms of stock prices and other financial instruments, when the price crosses a band, it's said to be too cheap or too expensive.

How to display Bollinger bands with Pandas.

#### URL

5. May 2023
6. www.w3schools.com www.w3schools.com
1. Panda

با استفاده از این تابع میشه برای ستون های عددی مقدار Count و Avg و غیره را بدست آورد

#### URL

7. www.w3schools.com www.w3schools.com
1. Panda

تعداد ردیف و ستون اون Data Frame را برمیگردونه.

#### URL

8. www.w3schools.com www.w3schools.com
1. Return the first 5 rows of the DataFrame

5 تا ردیف اول را برات بر میگردونه. یه ورودی هم شاید بگیره که در واقع تعداد ردیف هایی است که میخواد برگردونه

#### URL

9. www.w3schools.com www.w3schools.com
1. Pandas is a Python library.

یکی از کتاب خونه های خوبه Python.

#### URL

10. Apr 2023
11. codeberg.org codeberg.org
1. ff = ef['x','y']

Máscaras em Pandas são uma maneira de selecionar um subconjunto de dados de um DataFrame, Series ou outro objeto de dados baseado em uma condição booleana.

O código que deve ser adicionado no lugar de # a fazer é:

ff = ef[['x', 'y']]

Isso irá selecionar apenas as colunas 'x' e 'y' do DataFrame ef, que é o resultado da máscara m. A máscara m seleciona apenas as linhas onde o valor da coluna 'z' é False, e então, ef contém apenas essas linhas. Finalmente, ff é criado selecionando as colunas 'x' e 'y' do DataFrame ef.

#### URL

12. Dec 2021
13. foresttechnology.blog foresttechnology.blog

#### URL

14. Nov 2021
15. www.tensorflow.org www.tensorflow.org
1. date_time = pd.to_datetime(df.pop('Date Time'), format='%d.%m.%Y %H:%M:%S')
2. df.describe().transpose()

#### URL

16. Sep 2021
17. stackoverflow.com stackoverflow.com

#### URL

18. arrow.apache.org arrow.apache.org

#### URL

19. Aug 2020
20. nextjournal.com nextjournal.com

#### URL

21. Mar 2020
22. jvns.ca jvns.ca
1. It’s just that it often makes sense to write code in the order JOIN / WHERE / GROUP BY / HAVING. (I’ll often put a WHERE first to improve performance though, and I think most database engines will also do a WHERE first in practice)

Pandas usually writes code in this syntax:

1. `JOIN`
2. `WHERE`
3. `GROUP BY`
4. `HAVING`

Example:

1. `df = thing1.join(thing2) # like a JOIN`
2. `df = df[df.created_at > 1000] # like a WHERE`
3. `df = df.groupby('something', num_yes = ('yes', 'sum')) # like a GROUP BY`
4. `df = df[df.num_yes > 2] # like a HAVING, filtering on the result of a GROUP BY`
5. `df = df[['num_yes', 'something1', 'something']] # pick the columns I want to display, like a SELECT`
6. `df.sort_values('sometthing', ascending=True)[:30] # ORDER BY and LIMIT`
7. `df[:30]`

#### URL

23. Nov 2019
24. github.com github.com

#### URL

25. Oct 2019
26. pandas.pydata.org pandas.pydata.org
1. Indicate number of NA values placed in non-numeric columns.

This is only true when using the Python parsing engine.

``````Filled 3 NA values in column name
``````

If using the C parsing engine you get something like the following output:

``````Tokenization took: 0.01 ms
Type conversion took: 0.70 ms
Parser memory cleanup took: 0.01 ms
``````

#### URL

27. Feb 2019
28. stackoverflow.com stackoverflow.com
1. Efficient way to loop over Pandas Dataframe to make dummy variables (1 or 0 input)

dummy encoding

#### URL

29. Jun 2018
30. stackoverflow.com stackoverflow.com
1. if you need to pull out these rows and examine them

#### URL

31. May 2018
32. github.com github.com

#### URL

33. Apr 2018
34. geopandas.org geopandas.org
1. GeoPandas

#### URL

35. Mar 2018
36. simplistic.me simplistic.me
1. I'll skip the inefficient method I used before with the custom groupby aggregationm, and go for some neat trick using the mighty transform method.

a more constrained. and thus more efficient way to do transformations on groupbys than the apply method. You can do very cool stuff with it. For those of you who know splunk - this has the neat "streamstats" and "eventstats" capabilities

#### URL

37. Dec 2017
38. tomaugspurger.github.io tomaugspurger.github.io

#### URL

39. tselai.com tselai.com