일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- SQL
- Mac
- Google Spreadsheet
- Github
- array
- GIT
- Kotlin
- 파이썬
- Java
- dataframe
- string
- list
- math
- Python
- Tkinter
- Excel
- numpy
- django
- PySpark
- gas
- PostgreSQL
- Redshift
- Google Excel
- google apps script
- PANDAS
- c#
- hive
- matplotlib
- Apache
- Today
- Total
목록max (8)
달나라 노트
Syntax DataFrame.min(axis=1) DataFrame.max(axis=1) min method는 DataFrame에 적용하여 컬럼간에 가장 작은 값을 return합니다. max method는 DataFrame에 적용하여 컬럼간에 가장 작은 값을 return합니다. import pandas as pd dict_item = { 'col1': [1, 2, 3, 4, 5], 'col2': [5, 4, 3, 2, 1], } df_item = pd.DataFrame(dict_item) df_item.loc[:, 'min_col'] = df_item.loc[:, ['col1', 'col2']].min(axis=1) df_item.loc[:, 'max_col'] = df_item.loc[:, ['col..
Math.Max(a, b) method는 a와 b 두개의 숫자를 받고 둘 중 더 큰 수를 return합니다. Math.Min(a, b) method는 a와 b 두개의 숫자를 받고 둘 중 더 작은 수를 return합니다. using System; class MyProgram { public static void Main() { var max_value = Math.Max(10.3, 12); Console.WriteLine(max_value); var min_value = Math.Min(10.3, 12); Console.WriteLine(min_value); } } -- Result 12 10.3 예시는 위와 같습니다. 인자로서는 정수와 실수 모두 받을 수 있습니다.
C#에서 Math class는 다양한 수학적인 기능을 제공합니다. Math.max는 최대값을 return해줍니다. Math.min은 최소값을 return해줍니다. using System; class MyProgram { static void Main() { int value1 = 2; int value2 = 3; int result = Math.Max(value1, value2); Console.WriteLine(result); } } -- Result 3 max는 2개의 인자만을 받으며 2개의 인자 중 더 큰 값을 return합니다. using System; class MyProgram { static void Main() { int value1 = 2; int value2 = 3; int result..
Array에 적용할 수 있는 함수 중 Max, Min, Sum이 있습니다. 바로 예시를 봅시다. using System; using System.Linq; class MyProgram { static void Main() { int[] test_arr = { 1, 2, 3, 4, 5 }; Console.WriteLine(test_arr.Max()); Console.WriteLine(test_arr.Min()); Console.WriteLine(test_arr.Sum()); Console.WriteLine(test_arr.Average()); } } -- Result 5 1 15 3 Max는 Array에서 최대값을 return합니다. Min는 Array에서 최소값을 return합니다. Sum은 Array에..