Skip to content

Instantly share code, notes, and snippets.

@byung-u
Created January 15, 2019 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byung-u/70ef969512ca62b99a4ff50176482ceb to your computer and use it in GitHub Desktop.
Save byung-u/70ef969512ca62b99a4ff50176482ceb to your computer and use it in GitHub Desktop.
## Cell에서 AA로 시작하지 않는 것들은 모두 안보이게 하고 싶다는
## 요구사항에 대해서 이를 출력해주는 코드
import pandas as pd
def main():
df = pd.read_csv('./test.csv', delimiter='|', header=None)
for row in range(df.shape[1]):
df[row] = df[row].str.replace(r'^((?!AA).)*', '')
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment