Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- R기초
- 데이터프레임조회
- 프로그래머스 풀이
- 파이썬예제
- 데이터프레임 정보 조회
- 웹크롤링 예제
- r연습문제
- range retention
- 문자열함수
- 특정값 추출
- 타자연습파이썬
- java
- Python
- 문자열reverse
- requests 모듈
- 야구게임 코드
- 웹크롤링 실습
- 네이버웹툰크롤링
- 파이썬
- pandas
- 구구단
- rolling retention
- 파이썬 야구게임
- R실습
- 피처벡터화
- 조건인덱싱
- classic retention
- 함컴타자연습
- 웹크롤링
- R
Archives
- Today
- Total
서비스 기획자의 성장기록
[Today I learned] 2023.12.20.수: array와 list의 차이, 고유값 숫자세기 본문
Today I leaned..
[Today I learned] 2023.12.20.수: array와 list의 차이, 고유값 숫자세기
Jenny Noh 2023. 12. 20. 09:40📌 Array와 list의 차이
구글 search에 의하면 파이썬에서 array와 list의 차이는 동일한 type의 데이터만 담을 수 있느냐 (=list)와 서로다른 type의 데이터를 담을 수 있느냐(=array)이다.
In contrast, programmers use arrays to store values that vary in size or type, such as the sum of numbers in an array. Lists can contain only one type of element such as integers or strings, whereas an array may have elements that are different kinds of data such as an integer, string and boolean.
출처: 구글검색
📌 What does numpy.ndarray have?! 🤨
numpy.ndarray has no attribute 'value_counts'
numpy.ndarray has no attribute 'count'
numpy.ndarray has no attribute 'values'
고유값별로 갯수를 세고 싶다.
내가 의도한 것을 하려면 list or numpy array를 pandas의 Series로 바꿔줘야한다.
'Today I leaned..' 카테고리의 다른 글
[Today I learned] 2024.01.01.월: Pandas NaT (not a datetype) (2) | 2024.01.01 |
---|---|
[Today I learned] 2023.12.22.금: Pandas shift 함수 (0) | 2023.12.22 |
[Today I learned] 2023.12.16.토: pd.date_range().to_list(), datetime 객체에 하루 더하기, 새로운 열의 값 iloc으로 추가하기 (0) | 2023.12.16 |
[Today I learned] 2023.12.15.금: f-string으로 변수 불러오기 (0) | 2023.12.15 |
[Today I learned] 2023.12.14.목: 데이터프레임 파일로 저장하기 (0) | 2023.12.14 |