본문 바로가기

Row18

Python 하나의 행씩 추가하여 판다스 데이터프레임 생성하기, Create a Pandas Dataframe by appending one row at a time 질문 빈 DataFrame을 만든 다음에 하나씩 행을 추가하는 방법은 어떻게 하나요? 빈 DataFrame을 만들었습니다: df = pd.DataFrame(columns=('lib', 'qty1', 'qty2')) 그런 다음 새로운 행을 끝에 추가하고 하나의 필드를 채울 수 있습니다: df = df._set_value(index=len(df), col='qty1', value=10.0) 한 번에 하나의 필드에 대해서만 작동합니다. df에 새로운 행을 추가하는 더 나은 방법은 무엇인가요? 답변 df.loc[i]를 사용할 수 있습니다. 여기서 인덱스 i의 행은 데이터프레임에서 지정한 대로 될 것입니다. >>> import pandas as pd >>> from numpy.random import randin.. 2023. 5. 24.
Flutter 플러터에서 행의 요소 간 간격 설정하기, Set the space between Elements in Row Flutter 질문 코드: new Container( alignment: FractionalOffset.center, child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ new FlatButton( child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), ), new FlatButton( child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),), onPressed: moveToRegister, .. 2023. 5. 15.
Flutter 플러터에서 두 항목을 극단에 맞추어 정렬 - 하나는 왼쪽에, 다른 하나는 오른쪽에, Flutter align two items on extremes - one on the left and one on the right 질문 저는 두 항목을 왼쪽과 오른쪽 끝에 맞추려고 노력하고 있습니다. 왼쪽에 맞춰진 하나의 행과 그 하위에 오른쪽에 맞춰진 하위 행이 있습니다. 그러나 하위 행이 부모에서 정렬 속성을 가져오는 것 같습니다. 이것은 내 코드입니다. var SettingsRow = new Row( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: [ Text("Right",softWrap: true,), ], ); var nameRow = new Row( mainAxisAlignment: MainAxisAlignment.start, cross.. 2023. 5. 13.
flutter 플러터에서 wrap_content와 match_parent의 상응하는 것은 무엇인가요?, The equivalent of wrap_content and match_parent in flutter? 질문 안드로이드에서는 match_parent와 wrap_content를 사용하여 위젯을 부모에 상대적으로 자동으로 크기 조정합니다. Flutter에서는 기본적으로 모든 위젯이 wrap_content로 설정되는 것 같습니다. 부모의 너비와 높이를 채울 수 있도록 어떻게 변경할 수 있을까요? 답변 작은 트릭으로 할 수 있습니다: 다음과 같은 요구 사항이 있는 경우 : ( 너비,높이 ) Wrap_content ,Wrap_content : //이것을 자식으로 사용하세요 Wrap( children: [*your_child*]) Match_parent,Match_parent: //이것을 자식으로 사용하세요 Container( height: double.infinity, width: double.infinity,ch.. 2023. 5. 9.