Получи случайную криптовалюту за регистрацию!

pandas | python

Логотип телеграм канала @pandaspy — pandas | python P
Логотип телеграм канала @pandaspy — pandas | python
Адрес канала: @pandaspy
Категории: Курсы и гайды
Язык: Русский
Количество подписчиков: 44
Описание канала:

Без лишних слов о библиотеке pandas
Discord: https://discord.gg/7d7uG5bm

Рейтинги и Отзывы

2.50

2 отзыва

Оценить канал pandaspy и оставить отзыв — могут только зарегестрированные пользователи. Все отзывы проходят модерацию.

5 звезд

0

4 звезд

0

3 звезд

1

2 звезд

1

1 звезд

0


Последние сообщения

2022-05-11 12:16:32
Как установить определенный час и минуту в колонке с датой? Для этого используем метод dt.strftime(). Сначала переводим колонку в формат datetime (pd.to_datetime()), добавив формат и нужное нам время суток, формат указываем по типу Y&m&d/d&m&Y и т.д.

How do we set a specific hour and minute in the date column? To do this, we use the dt.strftime() method. First, we convert the column to datetime format (pd.to_datetime()) by adding the format and the time of day we want, the format we specify as Y&m&d/d&m&Y, etc.

pandas | python
116 views09:16
Открыть/Комментировать
2022-05-06 09:10:40
Для того, чтобы удалить необходимые колонные, используется команда drop(). Вызываем команду drop() на наш датафрейм и указываем имена колонн, которые будут удалены. Параметр axis=1 означает, что будет удалена вся колонна. Простыми словами, axis=0 это параметры для строки, по горизонтали, а axis=1 параметр для колонки, по вертикали. Параметр inplace=True означает, что мы будем вносить изменение в исходный датафрейм. Показатель false создаст копию датафрейма и внесет изменения в него.

The drop() command is used to remove columns. We call the drop() command on our dataframe and specify the names of the columns that will be deleted. The axis=1 parameter means that the entire column will be deleted. In simple words, axis=0 is the parameter for the row, horizontally, and axis=1 is the parameter for the column, vertically. The parameter inplace=True means that we will make a change in the original dataframe. The parameter false will create a copy of the dataframe and make changes to it.

pandas | python
100 views06:10
Открыть/Комментировать
2022-05-05 15:14:52
Как преобразовать колонки с годом, месяцем и числом в колонку с датой? Для этого используем метод to_datetime(), предварительно сложив номера года, месяца и дня, перемножив на определенные коэффициенты.

How to convert columns with year, month and number into column with date? To do this, use the to_datetime() method by first adding the year, month, and day numbers and multiplying by certain coefficients.

pandas | python
78 viewsedited  12:14
Открыть/Комментировать
2022-04-28 09:01:50
Как найти ячейку или несколько ячеек датафрейма, входящих в другой датафрейм? Сделать это очень просто с помощью оператора isin() в комбинации с оператором loc. Достаточно прописать, по какой колонке или группе колонок нам искать вхождение строк датафрейма в другой, и эта операция нам вернет все строчки нашего датафрейма, которые входят в другой датафрейм

How to find a cell or cells of a dataframe that is included in another dataframe? It is very easy to do using isin() operator in combination with loc operator. It is enough to specify in which column or group of columns we should look for the occurrence of dataframe rows in another one, and this operation will return all rows of our dataframe that are included in the other dataframe

pandas | python
90 views06:01
Открыть/Комментировать
2022-04-25 09:01:34
Как залить пустые промежутки между строчками? К примеру, у нас есть датафрейм, в котором в некоторых строчках пусто, и нам нужно заполнить эти пустые места данными, которые "выше" этих пустых ячеек. Это можно решить одной строчкой кода, с помощью команды ffill().

How do we fill the empty spaces between the lines? For example, we have a dataframe in which some lines are empty, and we need to fill these empty spaces with data that are "above" these empty cells. This can be solved with one line of code, with the command ffill().

pandas | python
#pandas
86 views06:01
Открыть/Комментировать
2022-04-22 09:10:53
Как определить сколько дней в том или ином месяце по определенной дате в колонке датафрейма? Для этого используем метод Period. С помощью лямбда-функции обрабатываем колонку с датой, в которой мы хотим узнать количество дней в месяце, частоту указываем 'S'. И используем метод days_in_month.

How to determine how many days there are in a particular month for a particular date in a dataframe column? To do this, we use the Period method. Using lambda function we process column with date, in which we want to know the number of days in the month, frequency we specify 'S'. And we use the method days_in_month.

pandas | python
73 views06:10
Открыть/Комментировать
2022-04-20 09:10:44
Как извлечь год/месяц/число из колонки с датой? Сначала конвертируем колонку с датой в формат Timestamp (дата-время), используя метод pd.to_datetime. Затем извлекаем интересующий нас показатель с помощью оператора datetime (datetime.year/datetime.month/datetime.day)

How to extract the year/month/number from the date column? First, convert the date column to Timestamp format using the pd.to_datetime method. Then we extract the figure of interest using the datetime operator (datetime.year/datetime.month/datetime.day)

pandas | python

#pandas
538 views06:10
Открыть/Комментировать
2022-04-19 13:15:46
Команда pd.melt. Транспонирует столбцы в строки. Для этого указывается датафрейм, который нужно транспонировать, затем колонки, которые должны остаться, и затем колонки, которые должны "превратиться" в строки (они должны быть числами). После чего создается две колонки "variable", где хранится название транспонируемых колонок и "value", где хранятся значения этих колонок.

The command pd.melt. Transposes columns into rows. To do this, you specify the dataframe you want to transpose, then the columns that should remain, and then the columns that should "turn" into rows (they should be numbers). After that, two columns are created: "variable", where the name of the columns to be transposed is stored, and "value", where the values of those columns are stored.

pandas | python
#pandas
436 views10:15
Открыть/Комментировать
2022-04-19 11:40:11
Команда pd.merge. Объединяет два датафрейма через колонку-ключ. Сначала указываются датафреймы (очередность важна), которые хотим объединить, затем указываем колонки-ключи (их может быть несколько), затем указываем метод объединения (left, right, inner, outer). 
.
The method pd.merge. Merges two dataframes via a key column. First you specify the dataframes (the order is important) that you want to merge, then you specify the key columns (there can be several), after that you specify the merging method (left, right, inner, outer).  
pandas | python
#pandas
60 views08:40
Открыть/Комментировать