본문 바로가기

Menu620

ImportError: IProgress not found ipywidgets.readthedocs.io/en/stable/user_install.html Installation — Jupyter Widgets 7.7.1 documentation In most cases, installing the Python ipywidgets package will also automatically configure classic Jupyter Notebook and JupyterLab 3.0 to display ipywidgets. With pip, do: Installing in classic Jupyter Notebook Most of the time, installing ipywidgets automa ipywidgets.readthedocs.io 위 url에 들어가.. 2022. 7. 4.
Remove Negative Values in Numeric columns in DataFrame df = data[data.select_dtypes(include = [np.number]).ge(0).all(1)] df When the DataFrame consists of Obejct, float, and DateTime, we can use "select_dtypes" to handle only numeric columns. 2022. 6. 28.
[C#] csv load using StreamReader using ExcelDataReader; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Threading.Tasks; namespace CSV_test { class Program { static void Main() { // 경로 내 csv를 저장할 빈 list 생성 List listpath = new List(); // openFileDialog로 처음에 경로 지정 ↓예시 string path = "C:\\Users\\KIERAN\\Desktop\\C# Test\\Data"; if (Directory.Exists(path)) { DirectoryInfo di = new Dir.. 2022. 6. 3.
[C#] csv load using DataTable using ExcelDataReader; using System; using System.Data; using System.IO; using System.Threading.Tasks; namespace CSV_test { class Program { static void Main() { // 경로 내 csv를 저장할 빈 list 생성 List listpath = new List(); // openFileDialog로 처음에 경로 지정 ↓예시 string path = "C:\\Users\\KIERAN\\Desktop\\C# Test\\Data"; if (Directory.Exists(path)) { DirectoryInfo di = new DirectoryInfo(path); /// 지정한 경로 내 하위 .. 2022. 6. 3.
[C#] Pass Listbox items from Main Form to Sub Form 부모폼에 있는 Listbox의 items들을 자녀폼의 Listbox로 옮기는 방법이다. 자녀 품을 Show 해주는 Button이 있다. (혹은 다른 event) Main Form에 작성 private void button1_Click(object sender, EventArgs e) { SubForm f = new SubForm(listbox1.Items); f.show(); } Sub Form에 작성 public partial class SubForm : Form { public SubForm() { InitializeComponent(); } public SubForm(ListBox.ObjectCollection objectCollection) { InitializeComponent(); this.l.. 2022. 6. 1.
[C#] Graph Plot, Delete Series1 on Legend 위 그림 속 2번째 Graph의 Legend에 "Series 1"이라는 명명하지 않은 Series가 입력되어 있다. 이를 지우기 위해서는 Graph를 plot하기 전에 Series.Clear()를 아래 코드와 같이 해주면 된다. 그러면, 그림 속 1번째 Graph와 같이 Legend가 나온다. chartgraphname.Series.Clear(); chartgraphname에는 명명한 graph의 이름을 기입하면 된다. 2022. 5. 31.
[C#] Create Dictionary<string, List<string>> GUI 작업 중, combobox에서 선택된 text를 받아서 그래프를 plot하는 기능을 구현하던 중, Dictionary 형식이 필요했다. 아래와 같은 코드 형식으로 작성하면 위와 같은 Dictionary 형태를 만들 수 있다. Dictionary dict_cbox_list = new Dictionary() { {"A", new List { "Actual: A", "Prediction: A" } }, {"B", new List { "Actual: B", "Prediction: B" } }, {"C", new List { "Actual: C", "Prediction: C" } }, {"D", new List { "Actual: D", "Prediction: D" } }, {"E", new List { .. 2022. 5. 30.
[C#] Dictionary Value 內 List 중복 제거 내가 다루고 있는 Dictionary 형태는 Dictionary이며, 주로 구현하고자하는 기능은 새로운 Value 이 추가되었을 때, 기존에 갖고 있는 List을 제외하고 새로운 List만 가져오는 것이다. StackOverflow 구글링하다가 2가지 방법을 알았다. 1. List를 새로 생성하여 새로운 List를 만들어서 Dict 내 Key를 새로운 List로 바꾸기 // 할당된 경로 내 동일한 Dict Value List가 있는 경우 삭제 후 새로운 File Path Dict 생성 List dict_file_0_list = new List(); for (int i = 0; i < dict_file_0["Batch1"].Count; i++) { dict_file_0_list.Add(dict_file_0.. 2022. 5. 28.
[C#] JSON을 이용하여 Dictionary를 text file로 저장하기 1. Newtonsoft.Json NuGet을 설치한다. 2. 사용할 Class에 Newtonsoft.Json을 추가한다. using Newtonsoft.Json; 위 코드를 입력하면 JsonConvert를 사용할 수 있다. 3. Dictionary를 text file로 저장 File.WriteAllText("FileName.txt", JsonConvert.SerializeObject(dictionary)); 4. 저장한 text file을 다시 dictionary로 불러오기 var Loaded_Dictionary = JsonConvert.DeserializeObject(File.ReadAllText("FileName.txt")); Dictionary 형태는 저장하려는, 불러오려는 Dictionary 형.. 2022. 5. 27.
[C#] Dictionary Key Rename, Dictionary Key 이름 변경 Stack Overflow 검색하다보니, Dictionary Function 중 Key 이름 변경 Function은 없다고한다. 그래서 어떤 사람이 Method 만들어서 Dictionary Key 이름 변경하는 법을 보여줬다. private static void RenameKey(IDictionary dic, TKey fromKey, TKey toKey) { TValue value = dic[fromKey]; dic.Remove(fromKey); dic[toKey] = value; } 위 함수를 사용할 경우, RenameKey(dict_Batch_1, "Description", "Description: Date/Tag"); 로 입력하면 내가 원하는 Tag명을 새롭게 변경할 수 있다. 2022. 5. 24.
Generate Time Index using Python import pandas as pd range = pd.date_range(start = "2022-01-01", end = "2022-12-31", freq = "1min") Timeindex = pd.DataFrame(range) Timeindex.rename(columns = {Timeindex.columns[0] : "Description: Timestamp"}, inplace = True) Timeindex 2022. 3. 25.
[Reinforcement Learning] The Limits of Dynamic Programming 1. 계산 복잡도 DP를 적용하는 문제의 규모가 거대하다면 계산만으로 풀어내기에는 한계가 있다. DP의 계산 복잡도는 State 크기의 3제곱에 비례한다. 따라서 DP로는 경우의 수가 우주의 원자 수보다 많은 바둑과 같은 문제는 절대 풀 수 없다. 2. 차원의 저주 State가 2차원으로 표현되는 (x, y)가 아닌 n차원이라면, State의 수가 지수적으로 증가한다. 계산 복잡도가 증가하므로 해결할 수 없다. 3. Environment에 대한 완벽한 정보 Reward와 State 변환 확률을 정확히 알고 해결할 수 있는 문제는 거진 없다. 따라서 Environment를 모르지만 Env와의 상호작용을 통해 경험을 바탕으로 학습하는 방법이 강화학습이다. RL과 DP의 차이는 RL은 Env의 Model을 몰.. 2022. 1. 16.
[Reinforcement Learning] RL open source sharing sites https://www.kaggle.com/search?q=reinforcement+learning+code+in%3Anotebooks Search | Kaggle www.kaggle.com https://medium.com/ai%C2%B3-theory-practice-business/reinforcement-learning-part-1-a-brief-introduction-a53a849771cf Reinforcement Learning, Part 1: A Brief Introduction What is Reinforcement Learning and how is it used? Find out in 5 minutes! medium.com https://www.analyticsvidhya.com/blog/.. 2022. 1. 13.
Entrainment(비말동반) in distillation refers to the liquid carried by vapour up to the tray above and is again caused by high vapour flow rates. It is detrimental because tray efficiency is reduced: lower volatile material is carried to a plate holding liquid of higher volatility. It could also contaminate high purity distillate. Excessive entrainment can lead to flooding. Fixed Bed Column에 촉매를 충분하게 넣지 않을 경우 반응물 첨가시 촉매들이 투입된 액체 or 가.. 2022. 1. 13.
Get a List of all Column Names in Pandas DataFrame 위와 같은 Pandas DataFrame에서 Column 이름만 쭉 보고싶을 때, 사용할 수 있는 코드가 2가지가 있다. 1. list(dataframe) 2. dataframe.columns.values.tolist() 위 코드를 사용하여 Pandas DataFrame Column들을 조회하고 Feature를 정할 수 있다. 2021. 12. 14.